release 0.6.4
[fapman] / packageselector.cpp
index 392189a..54d0827 100644 (file)
@@ -44,7 +44,7 @@ PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set
        iChangelog = "";
 
        ui->pushButton_website->setIcon(QPixmap("/usr/share/icons/hicolor/48x48/hildon/general_web.png"));
-       if( getMaemoOrgUrl(pkg)=="" && getMaemoOrgUrl(pkg->availablePackage())=="" ) {
+       if( getMaemoOrgUrl(pkg).isEmpty() && getMaemoOrgUrl(pkg->availablePackage()).isEmpty() ) {
                ui->pushButton_website->setEnabled(false);
        }
        if( pkg->isMarkedForOperation() )
@@ -76,7 +76,7 @@ PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set
        Package* upg_pkg = iPkg->availablePackage();
        if( !upg_pkg )
                upg_pkg = iPkg;
-       if( (!pkg->isUpgradeable() || (upg_pkg && upg_pkg->upgradeDescription()=="")) && (getMaemoOrgUrl(upg_pkg)=="") )
+       if( (!pkg->isUpgradeable() || (upg_pkg && upg_pkg->upgradeDescription().isEmpty())) && (getMaemoOrgUrl(upg_pkg).isEmpty()) )
                ui->radioTabChanges->hide();
 
        if( pkg->isUpgradeable() )
@@ -105,7 +105,7 @@ PackageSelector::PackageSelector(Package* pkg, AAptInterface* apt, Settings* set
                ui->radioRemove->setChecked(true);
        }
 
-       if( getMaemoOrgUrl(upg_pkg)!="" && !iChangelogFetched && !iFetchInProgress &&
+       if( !getMaemoOrgUrl(upg_pkg).isEmpty() && !iChangelogFetched && !iFetchInProgress &&
                iSettings->qsettings()->value("always_fetch_changes",false).toBool() )
        {
                queryChangelog();
@@ -406,7 +406,7 @@ void PackageSelector::on_radioTabChanges_clicked()
        if( !upg_pkg )
                upg_pkg = iPkg;
 
-       if( iPkg->isUpgradeable() && upg_pkg && upg_pkg->upgradeDescription()!="" )
+       if( iPkg->isUpgradeable() && upg_pkg && !upg_pkg->upgradeDescription().isEmpty() )
        {
                text += "<u><b>Upgrade description:</b></u>";
                text += "<font size=\"-1\"><br>";
@@ -416,7 +416,7 @@ void PackageSelector::on_radioTabChanges_clicked()
        }
 
        QString changelog;
-       if( getMaemoOrgUrl(upg_pkg)!="" && !iChangelogFetched && !iFetchInProgress ) {
+       if( !getMaemoOrgUrl(upg_pkg).isEmpty() && !iChangelogFetched && !iFetchInProgress ) {
                queryChangelog();
                changelog = "Fetching changelog...";
        } else {
@@ -538,7 +538,7 @@ void PackageSelector::queryChangelog()
                iNetworkAccessManager = new QNetworkAccessManager(this);
                connect(iNetworkAccessManager,SIGNAL(finished(QNetworkReply*)),this,SLOT(changelogFetchNetworkReply(QNetworkReply*)));
 
-               if( iSettings->qsettings()->value("use_proxies").toBool() && iSettings->qsettings()->value("http_proxy").toString()!="" )
+               if( iSettings->qsettings()->value("use_proxies").toBool() && !iSettings->qsettings()->value("http_proxy").toString().isEmpty() )
                {
                         QNetworkProxy proxy = Settings::createProxyFromString( iSettings->qsettings()->value("http_proxy").toString() );
                         iNetworkAccessManager->setProxy(proxy);