1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-22 02:02:10 +02:00

Revert "[Code] Use QDir::separator() instead of hardcoded "/""

This reverts commit 4f059a75ee.

It is really not helpful at all (Qt will automatically use native
separators)
This commit is contained in:
nowrep 2013-12-27 15:09:42 +01:00
parent a9dc3a929a
commit b8cb20ced6
3 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ MainApplication::MainApplication(int &argc, char** argv)
#if defined(QZ_WS_X11) && !defined(NO_SYSTEM_DATAPATH) #if defined(QZ_WS_X11) && !defined(NO_SYSTEM_DATAPATH)
DATADIR = USE_DATADIR; DATADIR = USE_DATADIR;
#else #else
DATADIR = qApp->applicationDirPath() + QDir::separator(); DATADIR = qApp->applicationDirPath() + "/";
#endif #endif
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
@ -250,11 +250,11 @@ MainApplication::MainApplication(int &argc, char** argv)
m_activeProfil = PROFILEDIR + "profiles/default/"; m_activeProfil = PROFILEDIR + "profiles/default/";
} }
else { else {
m_activeProfil = PROFILEDIR + "profiles/" + settings.value("Profiles/startProfile", "default").toString() + QDir::separator(); m_activeProfil = PROFILEDIR + "profiles/" + settings.value("Profiles/startProfile", "default").toString() + "/";
} }
} }
else { else {
m_activeProfil = PROFILEDIR + "profiles/" + startProfile + QDir::separator(); m_activeProfil = PROFILEDIR + "profiles/" + startProfile + "/";
} }
ProfileUpdater u(m_activeProfil); ProfileUpdater u(m_activeProfil);
@ -685,7 +685,7 @@ void MainApplication::loadTheme(const QString &name)
<< THEMESDIR; << THEMESDIR;
foreach (const QString &path, themePaths) { foreach (const QString &path, themePaths) {
const QString &theme = path + name + QDir::separator(); const QString &theme = path + name + "/";
if (QFile::exists(theme + "main.css")) { if (QFile::exists(theme + "main.css")) {
m_activeThemePath = theme; m_activeThemePath = theme;
break; break;
@ -694,7 +694,7 @@ void MainApplication::loadTheme(const QString &name)
if (m_activeThemePath.isEmpty()) { if (m_activeThemePath.isEmpty()) {
qWarning("Cannot load theme '%s'!", qPrintable(name)); qWarning("Cannot load theme '%s'!", qPrintable(name));
m_activeThemePath = THEMESDIR + DEFAULT_THEME_NAME + QDir::separator(); m_activeThemePath = THEMESDIR + DEFAULT_THEME_NAME + "/";
} }
QFile cssFile(m_activeThemePath + "main.css"); QFile cssFile(m_activeThemePath + "main.css");

View File

@ -774,7 +774,7 @@ void Preferences::createProfile()
return; return;
} }
QDir dir(mApp->PROFILEDIR + "profiles/"); QDir dir(mApp->PROFILEDIR + "profiles/");
if (QDir(dir.absolutePath() + QDir::separator() + name).exists()) { if (QDir(dir.absolutePath() + "/" + name).exists()) {
QMessageBox::warning(this, tr("Error!"), tr("This profile already exists!")); QMessageBox::warning(this, tr("Error!"), tr("This profile already exists!"));
return; return;
} }

View File

@ -50,7 +50,7 @@ ThemeManager::ThemeManager(QWidget* parent, Preferences* preferences)
QDir dir(path); QDir dir(path);
QStringList list = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); QStringList list = dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
foreach (const QString &name, list) { foreach (const QString &name, list) {
Theme themeInfo = parseTheme(dir.absoluteFilePath(name) + QDir::separator(), name); Theme themeInfo = parseTheme(dir.absoluteFilePath(name) + "/", name);
if (!themeInfo.isValid) { if (!themeInfo.isValid) {
continue; continue;
} }