summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff')
-rw-r--r--source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff54
1 files changed, 26 insertions, 28 deletions
diff --git a/source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff b/source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff
index e55e5ceea..2a944c10c 100644
--- a/source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff
+++ b/source/kde/kde/patch/ktorrent/ktorrent.use.package.geoip.database.diff
@@ -1,38 +1,36 @@
-diff -uar ktorrent-5.1.1.orig/plugins/infowidget/geoipmanager.cpp ktorrent-5.1.1/plugins/infowidget/geoipmanager.cpp
---- ktorrent-5.1.1.orig/plugins/infowidget/geoipmanager.cpp 2018-08-31 01:37:04.000000000 +0200
-+++ ktorrent-5.1.1/plugins/infowidget/geoipmanager.cpp 2019-05-11 14:32:39.599297006 +0200
+--- ./plugins/infowidget/geoipmanager.cpp.orig 2020-12-11 11:37:19.450009584 -0600
++++ ./plugins/infowidget/geoipmanager.cpp 2020-12-11 11:39:48.834012926 -0600
@@ -42,7 +42,7 @@
#ifdef USE_SYSTEM_GEOIP
- geo_ip = GeoIP_open_type(GEOIP_COUNTRY_EDITION, GEOIP_STANDARD);
+ geo_ip = GeoIP_open_type(GEOIP_COUNTRY_EDITION, GEOIP_STANDARD);
#else
-- geoip_data_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("geoip.dat"));
-+ geoip_data_file = QStringLiteral("/usr/share/apps/ktorrent/GeoIP/geoip.dat");
- if (geoip_data_file.isEmpty())
- geoip_data_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("GeoIP.dat"));
+- geoip_data_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("geoip.dat"));
++ geoip_data_file = QStringLiteral("/usr/share/apps/ktorrent/GeoIP/geoip.dat");
+ if (geoip_data_file.isEmpty())
+ geoip_data_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("GeoIP.dat"));
-@@ -57,12 +57,6 @@
- {
- QFileInfo fi(geoip_data_file);
- QDateTime now = QDateTime::currentDateTime();
-- if (fi.lastModified().daysTo(now) >= 30)
-- {
-- // if the last time the geoip file was modified, was more then
-- // 30 days ago, redownload it
-- downloadDataBase();
-- }
- }
+@@ -53,11 +53,6 @@
+ if (geo_ip) {
+ QFileInfo fi(geoip_data_file);
+ QDateTime now = QDateTime::currentDateTime();
+- if (fi.lastModified().daysTo(now) >= 30) {
+- // if the last time the geoip file was modified, was more then
+- // 30 days ago, redownload it
+- downloadDataBase();
+- }
}
+ }
#endif
-@@ -107,12 +101,6 @@
+@@ -101,12 +96,6 @@
- void GeoIPManager::downloadDataBase()
- {
+ void GeoIPManager::downloadDataBase()
+ {
-#ifndef USE_SYSTEM_GEOIP
-- Out(SYS_INW | LOG_NOTICE) << "Downloading GeoIP database: " << geoip_url << endl;
-- download_destination = kt::DataDir(CreateIfNotExists) + geoip_url.fileName();
-- KIO::CopyJob* job = KIO::copy(geoip_url, QUrl::fromLocalFile(download_destination), KIO::Overwrite | KIO::HideProgressInfo);
-- connect(job, &KIO::CopyJob::result, this, &GeoIPManager::databaseDownloadFinished);
+- Out(SYS_INW | LOG_NOTICE) << "Downloading GeoIP database: " << geoip_url << endl;
+- download_destination = kt::DataDir(CreateIfNotExists) + geoip_url.fileName();
+- KIO::CopyJob* job = KIO::copy(geoip_url, QUrl::fromLocalFile(download_destination), KIO::Overwrite | KIO::HideProgressInfo);
+- connect(job, &KIO::CopyJob::result, this, &GeoIPManager::databaseDownloadFinished);
-#endif
- }
+ }
- void GeoIPManager::databaseDownloadFinished(KJob* job)
+ void GeoIPManager::databaseDownloadFinished(KJob* job)