X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Faccountdialog.cpp;h=a5fe39e5846b547e28d2c3161e7e040b55b1315a;hb=ec3f00561af85a33926bb8039eeb7e52503a5990;hp=ecdb02f1eac0c80ae8afcd4e610a920ece008878;hpb=dfb7b11c5f32c619045a63741ff3f9a7d8aeffae;p=vlc-remote diff --git a/src/accountdialog.cpp b/src/accountdialog.cpp index ecdb02f..a5fe39e 100644 --- a/src/accountdialog.cpp +++ b/src/accountdialog.cpp @@ -24,6 +24,10 @@ #include #include #include +#include "appsettings.h" +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) +#include +#endif @@ -111,7 +115,9 @@ void AccountDialog::load() item->setFont(font); } ui->listWidget->addItem(item); - asycItems.append(*item); + if (AppSettings::isConnected()) { + asycItems.append(*item); + } } settings.endGroup(); @@ -121,7 +127,14 @@ void AccountDialog::load() // QFuture itemFutur = QtConcurrent::mapped(asycItems, asyncTestItem); - mFuturWatcher->setFuture(QtConcurrent::mapped(asycItems, asyncTestItem)); + if (AppSettings::isConnected()) { + mFuturWatcher->setFuture(QtConcurrent::mapped(asycItems, asyncTestItem)); + } + else { +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + QMaemo5InformationBox::information(this, tr("No network connection available!"), QMaemo5InformationBox::DefaultTimeout); +#endif + } } QListWidgetItem AccountDialog::asyncTestItem(const QListWidgetItem& item)