diff options
-rw-r--r-- | rbutil/rbutilqt/base/httpget.cpp | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/httpget.h | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/configure.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/configurefrm.ui | 10 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 2 |
8 files changed, 2 insertions, 32 deletions
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp index 05005ee6d3..66a7076391 100644 --- a/rbutil/rbutilqt/base/httpget.cpp +++ b/rbutil/rbutilqt/base/httpget.cpp @@ -24,7 +24,6 @@ QDir HttpGet::m_globalCache; //< global cach path value for new objects QUrl HttpGet::m_globalProxy; //< global proxy value for new objects -bool HttpGet::m_globalDumbCache = false; //< globally set cache "dumb" mode QString HttpGet::m_globalUserAgent; //< globally set user agent for requests HttpGet::HttpGet(QObject *parent) @@ -32,7 +31,6 @@ HttpGet::HttpGet(QObject *parent) { outputToBuffer = true; m_cached = false; - m_dumbCache = m_globalDumbCache; getRequest = -1; headRequest = -1; // if a request is cancelled before a reponse is available return some @@ -213,7 +211,7 @@ bool HttpGet::getFile(const QUrl &url) m_header.setValue("User-Agent", m_globalUserAgent); m_header.setValue("Connection", "Keep-Alive"); - if(m_dumbCache || !m_usecache) { + if(!m_usecache) { getFileFinish(); } else { diff --git a/rbutil/rbutilqt/base/httpget.h b/rbutil/rbutilqt/base/httpget.h index e8a936de08..73d3fbbaf5 100644 --- a/rbutil/rbutilqt/base/httpget.h +++ b/rbutil/rbutilqt/base/httpget.h @@ -45,14 +45,10 @@ class HttpGet : public QObject { return m_cached; } QDateTime timestamp(void) { return m_serverTimestamp; } - void setDumbCache(bool b) //< disable checking of http header timestamp for caching - { m_dumbCache = b; } static void setGlobalCache(const QDir& d) //< set global cache path { m_globalCache = d; } static void setGlobalProxy(const QUrl& p) //< set global proxy value { m_globalProxy = p; } - static void setGlobalDumbCache(bool b) //< set "dumb" (ignore server status) caching mode - { m_globalDumbCache = b; } static void setGlobalUserAgent(const QString& u) //< set global user agent string { m_globalUserAgent = u; } @@ -92,12 +88,10 @@ class HttpGet : public QObject QString m_query; //< constructed query to pass http getter QString m_path; //< constructed path to pass http getter QString m_hash; //< caching hash - bool m_dumbCache; //< true if caching should ignore the server header QHttpRequestHeader m_header; static QDir m_globalCache; //< global cache path value static QUrl m_globalProxy; //< global proxy value - static bool m_globalDumbCache; //< cache "dumb" mode global setting static QString m_globalUserAgent; //< global user agent string }; diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp index a42b33c1bd..4d3901fce3 100644 --- a/rbutil/rbutilqt/base/rbsettings.cpp +++ b/rbutil/rbutilqt/base/rbsettings.cpp @@ -69,7 +69,6 @@ const static struct { { RbSettings::TtsVoice, ":tts:/voice", "" }, { RbSettings::EncoderPath, ":encoder:/encoderpath", "" }, { RbSettings::EncoderOptions, ":encoder:/encoderoptions", "" }, - { RbSettings::CacheOffline, "offline", "false" }, { RbSettings::CacheDisabled, "cachedisable", "false" }, { RbSettings::TtsUseSapi4, "sapi/useSapi4", "false" }, { RbSettings::EncoderNarrowBand, ":encoder:/narrowband", "false" }, diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h index 7aada6e78c..7255def5f0 100644 --- a/rbutil/rbutilqt/base/rbsettings.h +++ b/rbutil/rbutilqt/base/rbsettings.h @@ -66,7 +66,6 @@ class RbSettings : public QObject WavtrimThreshold, EncoderComplexity, TtsSpeed, - CacheOffline, CacheDisabled, TtsUseSapi4, EncoderNarrowBand, diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index eef1fcf4e1..ef58d28607 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -202,7 +202,6 @@ void Config::accept() else // default to system temp path RbSettings::setValue(RbSettings::CachePath, QDir::tempPath()); RbSettings::setValue(RbSettings::CacheDisabled, ui.cacheDisable->isChecked()); - RbSettings::setValue(RbSettings::CacheOffline, ui.cacheOfflineMode->isChecked()); // tts settings RbSettings::setValue(RbSettings::UseTtsCorrections, ui.ttsCorrections->isChecked()); @@ -287,7 +286,6 @@ void Config::setUserSettings() RbSettings::setValue(RbSettings::CachePath, QDir::tempPath()); ui.cachePath->setText(QDir::toNativeSeparators(RbSettings::value(RbSettings::CachePath).toString())); ui.cacheDisable->setChecked(RbSettings::value(RbSettings::CacheDisabled).toBool()); - ui.cacheOfflineMode->setChecked(RbSettings::value(RbSettings::CacheOffline).toBool()); updateCacheInfo(RbSettings::value(RbSettings::CachePath).toString()); // TTS tab diff --git a/rbutil/rbutilqt/configurefrm.ui b/rbutil/rbutilqt/configurefrm.ui index 3c0afdc15b..491c896907 100644 --- a/rbutil/rbutilqt/configurefrm.ui +++ b/rbutil/rbutilqt/configurefrm.ui @@ -328,16 +328,6 @@ </property> </widget> </item> - <item> - <widget class="QCheckBox" name="cacheOfflineMode"> - <property name="toolTip"> - <string><p>This will try to use all information from the cache, even information about updates. Only use this option if you want to install without network connection. Note: you need to do the same install you want to perform later with network access first to download all required files to the cache.</p></string> - </property> - <property name="text"> - <string>O&ffline mode</string> - </property> - </widget> - </item> </layout> </item> <item row="4" column="1"> diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 0b94ba4c10..05af8c5ac7 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -210,10 +210,7 @@ void RbUtilQt::downloadInfo() daily = new HttpGet(this); connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); connect(qApp, SIGNAL(lastWindowClosed()), daily, SLOT(abort())); - if(RbSettings::value(RbSettings::CacheOffline).toBool()) - daily->setCache(true); - else - daily->setCache(false); + daily->setCache(false); ui.statusbar->showMessage(tr("Downloading build information, please wait ...")); qDebug() << "[RbUtil] downloading build info"; daily->setFile(&buildInfo); @@ -311,7 +308,6 @@ void RbUtilQt::updateSettings() manual->updateManual(); HttpGet::setGlobalProxy(proxy()); HttpGet::setGlobalCache(RbSettings::value(RbSettings::CachePath).toString()); - HttpGet::setGlobalDumbCache(RbSettings::value(RbSettings::CacheOffline).toBool()); if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION) { QApplication::processEvents(); @@ -645,8 +641,6 @@ void RbUtilQt::checkUpdate(void) update = new HttpGet(this); connect(update, SIGNAL(done(bool)), this, SLOT(downloadUpdateDone(bool))); connect(qApp, SIGNAL(lastWindowClosed()), update, SLOT(abort())); - if(RbSettings::value(RbSettings::CacheOffline).toBool()) - update->setCache(true); ui.statusbar->showMessage(tr("Checking for update ...")); update->getFile(QUrl(url)); diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index 17a4050140..e254865b25 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp @@ -76,8 +76,6 @@ void ThemesInstallWindow::downloadInfo() infoUrl.replace("%RBUTILVER%", VERSION); QUrl url = QUrl(infoUrl); qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); - if(RbSettings::value(RbSettings::CacheOffline).toBool()) - getter->setCache(true); getter->setFile(&themesInfo); connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |