diff --git a/src/config.cpp b/src/config.cpp index 70026fa..cdf9d1f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -51,7 +51,6 @@ Config::Config() m_advLayoutDirectionRL = settings.value( "advanced/layoutltr", false ).toBool(); m_advAutodetectEncoding = settings.value( "advanced/autodetectenc", false ).toBool(); m_advExternalEditorPath = settings.value( "advanced/editorpath", "/usr/bin/kate" ).toString(); - m_advCheckNewVersion = settings.value( "advanced/checknewver", true ).toBool(); m_toolbarMode = (Config::ToolbarMode) settings.value( "advanced/toolbarmode", TOOLBAR_LARGEICONSTEXT ).toInt(); m_lastOpenedDir = settings.value( "advanced/lastopendir", "." ).toString(); @@ -88,7 +87,6 @@ void Config::save( ) settings.setValue( "advanced/layoutltr", m_advLayoutDirectionRL ); settings.setValue( "advanced/autodetectenc", m_advAutodetectEncoding ); settings.setValue( "advanced/editorpath", m_advExternalEditorPath ); - settings.setValue( "advanced/checknewver", m_advCheckNewVersion ); settings.setValue( "advanced/toolbarmode", m_toolbarMode ); settings.setValue( "advanced/lastopendir", m_lastOpenedDir ); diff --git a/src/config.h b/src/config.h index d42698f..edcc991 100644 --- a/src/config.h +++ b/src/config.h @@ -85,7 +85,6 @@ class Config QString m_advExternalEditorPath; bool m_advLayoutDirectionRL; bool m_advAutodetectEncoding; - bool m_advCheckNewVersion; private: QString m_datapath; diff --git a/src/dialog_setup.cpp b/src/dialog_setup.cpp index 4503a6b..df18d28 100644 --- a/src/dialog_setup.cpp +++ b/src/dialog_setup.cpp @@ -101,8 +101,6 @@ DialogSetup::DialogSetup(QWidget *parent) rbToolbarText->setChecked( true ); break; } - - cbCheckForUpdates->setChecked( pConfig->m_advCheckNewVersion ); } DialogSetup::~DialogSetup() @@ -184,7 +182,6 @@ void DialogSetup::accept() // Autodetect encoding Check_Need_Restart( boxAutodetectEncoding, &pConfig->m_advAutodetectEncoding, &need_restart ); - pConfig->m_advCheckNewVersion = cbCheckForUpdates->isChecked(); // Layout direction management bool layout_rl = boxLayoutDirectionRL->isChecked(); diff --git a/src/dialog_setup.ui b/src/dialog_setup.ui index 727f9d5..46e4132 100644 --- a/src/dialog_setup.ui +++ b/src/dialog_setup.ui @@ -482,16 +482,6 @@ - - - - If this option is enabled, the application will check for updates (when new version of application is released). If a new version is available, the program will show a messagebox dialog informing you about new version. This check will only performed once in 24 hours. No user information is requested or transmitted from your computer during this check. - - - Perform a check whether a new version is available (once a week) - - - diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2e4850e..8344ebc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -226,19 +226,6 @@ void MainWindow::checkForSharedMemoryMessage() parseCmdLineArgs( args, true ); } -void MainWindow::checkNewVersionAvailable() -{ - // Create a New version available object if necessary. This object will auto-delete itself - CheckNewVersion * pNewVer = new CheckNewVersion(); - - connect( pNewVer, SIGNAL(error(int)), this, SLOT(newVerAvailError(int)) ); - connect( pNewVer, SIGNAL(newVersionAvailable( NewVersionMetaMap )), this, SLOT(newVerAvailable(NewVersionMetaMap)) ); - - pNewVer->setUrl( "http://www.kchmviewer.net/latestversion.txt" ); - pNewVer->start(); -} - - bool MainWindow::loadFile ( const QString &loadFileName, bool call_open_page ) { QString fileName = loadFileName; @@ -559,7 +546,7 @@ void MainWindow::printHelpAndExit() bool MainWindow::parseCmdLineArgs(const QStringList& args , bool from_another_app ) { QString filename, search_query, search_index, open_url, search_toc; - bool do_autotest = false, disable_vcheck = false, force_background = false; + bool do_autotest = false, force_background = false; // argv[0] in Qt is still a program name for ( int i = 1; i < args.size(); i++ ) @@ -578,8 +565,6 @@ bool MainWindow::parseCmdLineArgs(const QStringList& args , bool from_another_ap i++; // ignore else if ( args[i] == "-background" ) force_background = true; - else if ( args[i] == "-novcheck" ) - disable_vcheck = true; else if ( args[i] == "-v" || args[i] == "--version" ) { printf("kchmviewer version %d.%d built at %s %s\n", APP_VERSION_MAJOR, APP_VERSION_MINOR, __DATE__, __TIME__ ); @@ -605,19 +590,6 @@ bool MainWindow::parseCmdLineArgs(const QStringList& args , bool from_another_ap } } - // Check for a new version if needed - if ( pConfig->m_advCheckNewVersion && !disable_vcheck ) - { - QSettings settings; - - if ( settings.contains( "advanced/lastupdate" ) ) - { - QDateTime lastupdate = settings.value( "advanced/lastupdate" ).toDateTime(); - - if ( lastupdate.secsTo( QDateTime::currentDateTime() ) >= 86400 * 7 ) // seven days - checkNewVersionAvailable(); - } - } // Opening the file? if ( !filename.isEmpty() ) @@ -1167,7 +1139,6 @@ void MainWindow::setupActions() // Settings connect( settings_SettingsAction, SIGNAL( triggered() ), this, SLOT( actionChangeSettings() ) ); connect( actionEdit_toolbars, SIGNAL( triggered() ), this, SLOT( actionEditToolbars() ) ); - connect( actionCheck_for_updates, SIGNAL(triggered()), this, SLOT(checkNewVersionAvailable()) ); // Help menu connect( actionAbout_kchmviewer, SIGNAL(triggered()), this, SLOT(actionAboutApp()) ); diff --git a/src/mainwindow.h b/src/mainwindow.h index d24b4d3..f73713f 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -143,8 +143,6 @@ class MainWindow : public QMainWindow, public Ui::MainWindow void updateToolbars(); void updateActions(); - void checkNewVersionAvailable(); - protected slots: // Called from the timer in main constructor void firstShow(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index cb8e08b..8c66bc5 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -20,7 +20,7 @@ 0 0 873 - 25 + 29 @@ -29,8 +29,6 @@ - -