summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/themesinstallwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/themesinstallwindow.cpp')
-rw-r--r--rbutil/rbutilqt/themesinstallwindow.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp
index e254865b25..9f60dfd212 100644
--- a/rbutil/rbutilqt/themesinstallwindow.cpp
+++ b/rbutil/rbutilqt/themesinstallwindow.cpp
@@ -47,12 +47,25 @@ ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent)
47 connect(ui.listThemes, SIGNAL(itemSelectionChanged()), this, SLOT(updateSize())); 47 connect(ui.listThemes, SIGNAL(itemSelectionChanged()), this, SLOT(updateSize()));
48 connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool))); 48 connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool)));
49 49
50 if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
51 igetter.setCache(true);
52 else
53 {
54 if(infocachedir.isEmpty())
55 {
56 infocachedir = QDir::tempPath() + "rbutil-themeinfo";
57 QDir d = QDir::temp();
58 d.mkdir("rbutil-themeinfo");
59 }
60 igetter.setCache(infocachedir);
61 }
62
50 logger = NULL; 63 logger = NULL;
51} 64}
52 65
53ThemesInstallWindow::~ThemesInstallWindow() 66ThemesInstallWindow::~ThemesInstallWindow()
54{ 67{
55 if(infocachedir!="") 68 if(!infocachedir.isEmpty())
56 Utils::recursiveRmdir(infocachedir); 69 Utils::recursiveRmdir(infocachedir);
57} 70}
58 71
@@ -75,7 +88,7 @@ void ThemesInstallWindow::downloadInfo()
75 infoUrl.replace("%RELEASE%", installInfo.release()); 88 infoUrl.replace("%RELEASE%", installInfo.release());
76 infoUrl.replace("%RBUTILVER%", VERSION); 89 infoUrl.replace("%RBUTILVER%", VERSION);
77 QUrl url = QUrl(infoUrl); 90 QUrl url = QUrl(infoUrl);
78 qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); 91 qDebug() << "[Themes] Info URL:" << url;
79 getter->setFile(&themesInfo); 92 getter->setFile(&themesInfo);
80 93
81 connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); 94 connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
@@ -219,21 +232,7 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p
219 text.replace("\n", "<br/>"); 232 text.replace("\n", "<br/>");
220 ui.themeDescription->setHtml(text); 233 ui.themeDescription->setHtml(text);
221 iniDetails.endGroup(); 234 iniDetails.endGroup();
222
223 igetter.abort(); 235 igetter.abort();
224 if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
225 igetter.setCache(true);
226 else
227 {
228 if(infocachedir=="")
229 {
230 infocachedir = QDir::tempPath() + "rbutil-themeinfo";
231 QDir d = QDir::temp();
232 d.mkdir("rbutil-themeinfo");
233 }
234 igetter.setCache(infocachedir);
235 }
236
237 igetter.getFile(img); 236 igetter.getFile(img);
238} 237}
239 238