23 #include "doomseekerfilepaths.h" 
   25 #include "datapaths.h" 
   26 #include "strings.hpp" 
   29 static const QString DATA_SEARCH_PREFIX = 
"data";
 
   31 DataPaths *DoomseekerFilePaths::pDataPaths = 
nullptr;
 
   33 const QString DoomseekerFilePaths::CACERTS_FILENAME = 
"cacerts.pem";
 
   34 const QString DoomseekerFilePaths::IP2C_DATABASE_FILENAME = 
"IpToCountry.dat";
 
   36 const QString DoomseekerFilePaths::TEMP_SERVER_CONFIG_FILENAME = 
"tmpserver.cfg";
 
   37 const QString DoomseekerFilePaths::INI_FILENAME = 
"doomseeker.ini";
 
   38 const QString DoomseekerFilePaths::IRC_INI_FILENAME = 
"doomseeker-irc.ini";
 
   39 const QString DoomseekerFilePaths::PASSWORD_INI_FILENAME = 
"doomseeker-password.ini";
 
   41 QString DoomseekerFilePaths::cacerts()
 
   44         for (
const QString &path : paths)
 
   46                 if (QFile(path).exists())
 
   52 QString DoomseekerFilePaths::ini()
 
   57 QString DoomseekerFilePaths::ircIni()
 
   64         for (
const QString &searchPath : QDir::searchPaths(DATA_SEARCH_PREFIX))
 
   67                 if (QFile(path).exists())
 
   78 QString DoomseekerFilePaths::joinIfNeitherEmpty(
const QString &left, 
const QString &right)
 
   80         if (left.trimmed().isEmpty() || right.trimmed().isEmpty())
 
   82         return left + 
"/" + right;
 
   85 QString DoomseekerFilePaths::passwordIni()
 
   90 QString DoomseekerFilePaths::tempServerConfig()
 
   95 QString DoomseekerFilePaths::updatePackagesStorageDir()