[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets
From: Laurent Montel <montel () kde ! org>
Date: 2009-06-21 10:10:16
Message-ID: 1245579016.975754.26164.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 984634 by mlaurent:
Minor optimisation
M +5 -5 kickoff/core/recentlyusedmodel.cpp
M +1 -1 system-monitor/net.cpp
M +3 -3 trash/trash.cpp
M +0 -1 trash/trash.h
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/recentlyusedmodel.cpp #984633:984634
@@ -80,10 +80,10 @@
QList<QStandardItem*> row = recentAppItem->takeRow(recentAppItem->rowCount() - 1);
//don't leave pending stuff in itemsByPath
- if (row.count() > 0) {
+ if (!row.isEmpty()) {
itemsByPath.remove(row.first()->data(UrlRole).toString());
- }
- qDeleteAll(row.begin(), row.end());
+ qDeleteAll(row.begin(), row.end());
+ }
}
}
@@ -110,7 +110,7 @@
{
// create branch for documents and add existing items
recentDocumentItem = new QStandardItem(i18n("Documents"));
- QStringList documents = KRecentDocument::recentDocuments();
+ const QStringList documents = KRecentDocument::recentDocuments();
foreach(const QString& document, documents) {
addRecentDocument(document, true);
}
@@ -122,7 +122,7 @@
{
recentAppItem = new QStandardItem(i18n("Applications"));
- QList<KService::Ptr> services = RecentApplications::self()->recentApplications();
+ const QList<KService::Ptr> services = RecentApplications::self()->recentApplications();
for(int i = 0; i < maxRecentApps && i < services.count(); ++i) {
addRecentApplication(services[i], true);
}
--- trunk/KDE/kdebase/workspace/plasma/applets/system-monitor/net.cpp #984633:984634
@@ -56,7 +56,7 @@
this, SLOT(sourceAdded(const QString&)));
connect(engine(), SIGNAL(sourceRemoved(const QString&)),
this, SLOT(sourceRemoved(const QString&)));
- if (engine()->sources().count() > 0) {
+ if (!engine()->sources().isEmpty()) {
sourcesAdded();
}
}
--- trunk/KDE/kdebase/workspace/plasma/applets/trash/trash.cpp #984633:984634
@@ -314,7 +314,7 @@
//seek for an item in the places (e.g. Dolphin sidebar)
const QModelIndex index = m_places->closestItem(url);
- if (devList.count() > 0) {
+ if (!devList.isEmpty()) {
m_icon->setIcon("arrow-up-double");
} else if (m_places->bookmarkForIndex(index).url() == url) {
m_icon->setIcon("edit-delete");
@@ -332,7 +332,7 @@
{
if (KUrl::List::canDecode(event->mimeData())) {
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
- if (urls.count() > 0) {
+ if (!urls.isEmpty()) {
event->accept();
//some special operation was done instead of simply deleting a file
@@ -352,7 +352,7 @@
//seek for an item in the places (e.g. Dolphin sidebar)
const QModelIndex index = m_places->closestItem(url);
- if (devList.count() > 0) {
+ if (!devList.isEmpty()) {
//Assuming a mountpoint has a single device
Solid::Device device = devList.first();
--- trunk/KDE/kdebase/workspace/plasma/applets/trash/trash.h #984633:984634
@@ -35,7 +35,6 @@
class KCModuleProxy;
class KFilePlacesModel;
class KProcess;
-class KPropertiesDialog;
namespace Plasma
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic