diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-13 19:45:29 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-13 19:45:29 +0100 |
commit | 1f1826e39c2e9c8b548017153b34ab8d68bb8d03 (patch) | |
tree | dd44d964f0c0e2c1f0b890d1a1bc5388ffdd44a2 /rbutil/rbutilqt | |
parent | d608fd604b4a3c0f0f9ba9dc3bcce7aae6c557f7 (diff) | |
download | rockbox-1f1826e39c2e9c8b548017153b34ab8d68bb8d03.tar.gz rockbox-1f1826e39c2e9c8b548017153b34ab8d68bb8d03.zip |
Remove Rockbox Utility Offline Mode.
Offline Mode was intended to allow performing an installation without network
access. However, to get the required files cached the same installation has to
be performed with network access, which is a rather strange prerequisite. A
better way would be a way to direct Rockbox Utility to some local "repository"
that holds the required files.
Furthermore, Offline Mode hasn't been tested since long and is likely to be
broken since the caching mechanism has been extended.
For now remove this functionality. As far as I know it's been rarely used (if
at all) anyway.
Change-Id: Ib2af4892708e0440bd0a7940c131f04182ddb39a
Diffstat (limited to 'rbutil/rbutilqt')
-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))); |