diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 8ecdb0849..a6b6dc66e 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -121,7 +121,7 @@ MainApplication::MainApplication(int &argc, char** argv) #if defined(QZ_WS_X11) && !defined(NO_SYSTEM_DATAPATH) DATADIR = USE_DATADIR; #else - DATADIR = qApp->applicationDirPath() + "/"; + DATADIR = qApp->applicationDirPath() + QDir::separator(); #endif #ifdef Q_OS_MAC @@ -250,11 +250,11 @@ MainApplication::MainApplication(int &argc, char** argv) m_activeProfil = PROFILEDIR + "profiles/default/"; } else { - m_activeProfil = PROFILEDIR + "profiles/" + settings.value("Profiles/startProfile", "default").toString() + "/"; + m_activeProfil = PROFILEDIR + "profiles/" + settings.value("Profiles/startProfile", "default").toString() + QDir::separator(); } } else { - m_activeProfil = PROFILEDIR + "profiles/" + startProfile + "/"; + m_activeProfil = PROFILEDIR + "profiles/" + startProfile + QDir::separator(); } ProfileUpdater u(m_activeProfil); @@ -685,7 +685,7 @@ void MainApplication::loadTheme(const QString &name) << THEMESDIR; foreach (const QString &path, themePaths) { - const QString &theme = path + name + "/"; + const QString &theme = path + name + QDir::separator(); if (QFile::exists(theme + "main.css")) { m_activeThemePath = theme; break; @@ -694,7 +694,7 @@ void MainApplication::loadTheme(const QString &name) if (m_activeThemePath.isEmpty()) { qWarning("Cannot load theme '%s'!", qPrintable(name)); - m_activeThemePath = THEMESDIR + DEFAULT_THEME_NAME + "/"; + m_activeThemePath = THEMESDIR + DEFAULT_THEME_NAME + QDir::separator(); } QFile cssFile(m_activeThemePath + "main.css"); diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 307b19cd0..13d5a11ee 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -774,7 +774,7 @@ void Preferences::createProfile() return; } QDir dir(mApp->PROFILEDIR + "profiles/"); - if (QDir(dir.absolutePath() + "/" + name).exists()) { + if (QDir(dir.absolutePath() + QDir::separator() + name).exists()) { QMessageBox::warning(this, tr("Error!"), tr("This profile already exists!")); return; } diff --git a/src/lib/preferences/thememanager.cpp b/src/lib/preferences/thememanager.cpp index 819d0175e..ab8ee73ab 100644 --- a/src/lib/preferences/thememanager.cpp +++ b/src/lib/preferences/thememanager.cpp @@ -50,7 +50,7 @@ ThemeManager::ThemeManager(QWidget* parent, Preferences* preferences) QDir dir(path); QStringList list = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); foreach (const QString &name, list) { - Theme themeInfo = parseTheme(dir.absoluteFilePath(name) + "/", name); + Theme themeInfo = parseTheme(dir.absoluteFilePath(name) + QDir::separator(), name); if (!themeInfo.isValid) { continue; }