diff options
Diffstat (limited to 'src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp')
-rw-r--r-- | src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp b/src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp index e326641..14aecb9 100644 --- a/src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp +++ b/src/frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.cpp @@ -2,14 +2,14 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2008 by the BibleTime developers. +* Copyright 1999-2011 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ #include "frontend/bookshelfmanager/cswordsetupinstallsourcesdialog.h" -#include <boost/scoped_ptr.hpp> +#include <QSharedPointer> #include <QComboBox> #include <QDir> #include <QFileInfo> @@ -25,7 +25,7 @@ #include <QProgressDialog> #include <QApplication> #include <QDebug> -#include "frontend/bookshelfmanager/instbackend.h" +#include "backend/btinstallbackend.h" #include "util/dialogutil.h" const QString PROTO_FILE( QObject::tr("Local") ); //Local path @@ -102,11 +102,10 @@ void CSwordSetupInstallSourcesDialog::slotOk() { //BTInstallMgr iMgr; //sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source( &iMgr, m_captionEdit->text() ); - sword::InstallSource is = instbackend::source(m_captionEdit->text()); + sword::InstallSource is = BtInstallBackend::source(m_captionEdit->text()); if ( (QString)is.caption.c_str() == m_captionEdit->text() ) { //source already exists util::showInformation( this, tr( "Error" ), - /** \bug Double space in the following string: */ - tr("A source with this caption already exists. Please provide a different caption.")); + tr("A source with this caption already exists. Please provide a different caption.")); return; } @@ -177,17 +176,15 @@ void CSwordSetupInstallSourcesDialog::slotGetListClicked() { qApp->processEvents(); qWarning() << "Start downloading the list of sources"; int ret = iMgr.refreshRemoteSourceConfiguration(); - bool success = false; + if ( !ret ) { //make sure the sources were updated sucessfully qDebug() << "download succeeded"; - success = true; m_progressDialog->setValue(100); //make sure the dialog closes m_remoteListAdded = true; accept(); } else { qWarning("InstallMgr: getting remote list returned an error."); - success = false; } delete m_progressDialog; m_progressDialog = 0; |