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

Moved config directory info ~/.config/qupzilla

See #774
This commit is contained in:
nowrep 2013-02-21 11:05:00 +01:00
parent 3b3e62cd76
commit 3e743c9d1f
2 changed files with 13 additions and 4 deletions

View File

@ -21,6 +21,7 @@ Version 1.4.0
* don't steal Ctrl+B/U/I shortcuts from page * don't steal Ctrl+B/U/I shortcuts from page
* disabled by default opacity effect on tab previews - see BUILDING * disabled by default opacity effect on tab previews - see BUILDING
* improved showing navigation toolbar in fullscreen * improved showing navigation toolbar in fullscreen
* moved config directory into ~/.config/qupzilla
* fixed opening browser with url with ampersand (%26) as command line argument * fixed opening browser with url with ampersand (%26) as command line argument
* fixed scrolling to anchor in background tabs * fixed scrolling to anchor in background tabs
* fixed parsing UTF-8 filenames in Content-Disposition header * fixed parsing UTF-8 filenames in Content-Disposition header

View File

@ -128,7 +128,15 @@ MainApplication::MainApplication(int &argc, char** argv)
#ifdef PORTABLE_BUILD #ifdef PORTABLE_BUILD
PROFILEDIR = DATADIR + "profiles/"; PROFILEDIR = DATADIR + "profiles/";
#else #else
PROFILEDIR = QDir::homePath() + "/.qupzilla/"; bool confPathExists = QDir(QDir::homePath() + "/.config/qupzilla").exists();
bool homePathExists = QDir(QDir::homePath() + "/.qupzilla").exists();
if (homePathExists && !confPathExists) {
PROFILEDIR = QDir::homePath() + "/.qupzilla/";
}
else {
PROFILEDIR = QDir::homePath() + "/.config/qupzilla/";
}
#endif #endif
TRANSLATIONSDIR = DATADIR + "locale/"; TRANSLATIONSDIR = DATADIR + "locale/";
@ -1089,7 +1097,7 @@ bool MainApplication::checkSettingsDir()
/* /*
$HOMEDIR $HOMEDIR
| |
.qupzilla/ .config/qupzilla/
| |
profiles/----------- profiles/-----------
| | | |
@ -1113,7 +1121,7 @@ bool MainApplication::checkSettingsDir()
dir.mkdir("profiles"); dir.mkdir("profiles");
dir.cd("profiles"); dir.cd("profiles");
//.qupzilla/profiles //.config/qupzilla/profiles
QFile(PROFILEDIR + "profiles/profiles.ini").remove(); QFile(PROFILEDIR + "profiles/profiles.ini").remove();
QFile(":data/profiles.ini").copy(PROFILEDIR + "profiles/profiles.ini"); QFile(":data/profiles.ini").copy(PROFILEDIR + "profiles/profiles.ini");
QFile(PROFILEDIR + "profiles/profiles.ini").setPermissions(QFile::ReadUser | QFile::WriteUser); QFile(PROFILEDIR + "profiles/profiles.ini").setPermissions(QFile::ReadUser | QFile::WriteUser);
@ -1121,7 +1129,7 @@ bool MainApplication::checkSettingsDir()
dir.mkdir("default"); dir.mkdir("default");
dir.cd("default"); dir.cd("default");
//.qupzilla/profiles/default //.config/qupzilla/profiles/default
QFile(PROFILEDIR + "profiles/default/browsedata.db").remove(); QFile(PROFILEDIR + "profiles/default/browsedata.db").remove();
QFile(":data/browsedata.db").copy(PROFILEDIR + "profiles/default/browsedata.db"); QFile(":data/browsedata.db").copy(PROFILEDIR + "profiles/default/browsedata.db");
QFile(PROFILEDIR + "profiles/default/browsedata.db").setPermissions(QFile::ReadUser | QFile::WriteUser); QFile(PROFILEDIR + "profiles/default/browsedata.db").setPermissions(QFile::ReadUser | QFile::WriteUser);