summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-03-20 00:50:21 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-03-20 00:50:21 +0100
commit6eb9b36039f9c3a814207950ad35322ea1a8d3f0 (patch)
tree9d19c4b230d0386c3a4c691a9ed8f75decb052d6
parentFixed history classes documentation (diff)
downloadrekonq-6eb9b36039f9c3a814207950ad35322ea1a8d3f0.tar.xz
QDesktopServices removed! Now rekonq lives just in kde directories!!
-rw-r--r--src/cookiejar.cpp8
-rw-r--r--src/history.cpp15
2 files changed, 4 insertions, 19 deletions
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index 098a2d47..4ed82e6d 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
@@ -186,14 +186,6 @@ void CookieJar::save()
if (!m_loaded)
return;
purgeOldCookies();
- QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
- if (directory.isEmpty())
- directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
- if (!QFile::exists(directory))
- {
- QDir dir;
- dir.mkpath(directory);
- }
QString filepath = KStandardDirs::locateLocal("appdata", "cookies.ini");
KConfig iniconfig( filepath );
diff --git a/src/history.cpp b/src/history.cpp
index 9813d438..424c9aad 100644
--- a/src/history.cpp
+++ b/src/history.cpp
@@ -237,13 +237,12 @@ void HistoryManager::loadSettings()
}
-
void HistoryManager::load()
{
loadSettings();
- QFile historyFile(QDesktopServices::storageLocation(QDesktopServices::DataLocation)
- + QLatin1String("/history"));
+ QString historyFilePath = KStandardDirs::locateLocal("appdata" , "history");
+ QFile historyFile( historyFilePath );
if (!historyFile.exists())
return;
if (!historyFile.open(QFile::ReadOnly))
@@ -329,15 +328,9 @@ void HistoryManager::save()
if (first == m_history.count() - 1)
saveAll = true;
- QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
- if (directory.isEmpty())
- directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
- if (!QFile::exists(directory)) {
- QDir dir;
- dir.mkpath(directory);
- }
+ QString historyFilePath = KStandardDirs::locateLocal("appdata" , "history");
+ QFile historyFile( historyFilePath );
- QFile historyFile(directory + QLatin1String("/history"));
// When saving everything use a temporary file to prevent possible data loss.
QTemporaryFile tempFile;
tempFile.setAutoRemove(false);