[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/kickoff
From: Laurent Montel <montel () kde ! org>
Date: 2009-06-08 7:17:07
Message-ID: 1244445427.043320.7890.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 978774 by mlaurent:
const'ify
M +1 -1 core/systemmodel.cpp
M +2 -2 simpleapplet/simpleapplet.cpp
M +3 -3 ui/contextmenufactory.cpp
M +2 -2 ui/flipscrollview.cpp
M +1 -1 ui/itemdelegate.cpp
M +1 -1 ui/searchbar.cpp
M +1 -1 ui/tabbar.cpp
M +1 -1 ui/tabbar.h
M +1 -1 ui/urlitemview.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/systemmodel.cpp \
#978773:978774 @@ -105,7 +105,7 @@
}
void loadApplications() {
- QStringList apps = Kickoff::systemApplicationList();
+ const QStringList apps = Kickoff::systemApplicationList();
appsList.clear();
foreach(const QString &app, apps) {
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp \
#978773:978774 @@ -286,7 +286,7 @@
KConfigGroup cg = config();
QString iconname = "start-here-kde";
- QStringList viewtypes = cg.readEntry("views", QStringList());
+ const QStringList viewtypes = cg.readEntry("views", QStringList());
if(viewtypes.isEmpty()) { // backward-compatibility to <KDE4.3
QByteArray oldview = cg.readEntry("view", QByteArray());
if (!oldview.isEmpty() && oldview != "Combined") {
@@ -686,7 +686,7 @@
void MenuLauncherApplet::actionTriggered(QAction *action)
{
- KUrl url = action->data().value<KUrl>();
+ const KUrl url = action->data().value<KUrl>();
if (url.scheme() == "leave") {
if (! d->launcher)
d->launcher = new Kickoff::UrlItemLauncher(d->menuview);
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/contextmenufactory.cpp \
#978773:978774 @@ -63,7 +63,7 @@
KUrl kUrl(url);
KActionCollection actionCollection((QObject*)0);
KFileItemList items;
- QString mimeType = KMimeType::findByUrl(kUrl, 0, false, true)->name();
+ const QString mimeType = KMimeType::findByUrl(kUrl, 0, false, true)->name();
items << KFileItem(url, mimeType, KFileItem::Unknown);
KParts::BrowserExtension::PopupFlags browserFlags = \
KParts::BrowserExtension::DefaultPopupItems; if (items.first().isLocalFile()) {
@@ -119,7 +119,7 @@
return;
}
- bool isFavorite = FavoritesModel::isFavorite(url);
+ const bool isFavorite = FavoritesModel::isFavorite(url);
QList<QAction*> actions;
@@ -185,7 +185,7 @@
}
// device actions
- QString udi = index.data(DeviceUdiRole).toString();
+ const QString udi = index.data(DeviceUdiRole).toString();
Solid::Device device(udi);
Solid::StorageAccess *access = device.as<Solid::StorageAccess>();
QAction *ejectAction = 0;
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/flipscrollview.cpp \
#978773:978774 @@ -116,7 +116,7 @@
Q_UNUSED(headerIndex)
QFontMetrics fm(KGlobalSettings::smallestReadableFont());
const int top = ItemDelegate::TOP_OFFSET - q->verticalScrollBar()->value();
- int minHeight = ItemDelegate::FIRST_HEADER_HEIGHT;
+ const int minHeight = ItemDelegate::FIRST_HEADER_HEIGHT;
QRect rect(backArrowRect().right() + ItemDelegate::BACK_ARROW_SPACING, top,
q->width() - backArrowRect().width() - \
ItemDelegate::BACK_ARROW_SPACING + 1, @@ -464,7 +464,7 @@
model()->fetchMore(index);
}
- bool hasChildren = model()->hasChildren(index);
+ const bool hasChildren = model()->hasChildren(index);
if (hasChildren) {
d->setCurrentRoot(index);
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/itemdelegate.cpp \
#978773:978774 @@ -105,7 +105,7 @@
Q_ASSERT(index.isValid());
if (index.model()->hasChildren(index)) {
- int childCount = index.model()->rowCount(index);
+ const int childCount = index.model()->rowCount(index);
for (int i = 0; i < childCount; ++i) {
QModelIndex child = index.model()->index(i, 0, index);
if (!child.data(UrlRole).isNull()) {
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/searchbar.cpp \
#978773:978774 @@ -72,7 +72,7 @@
d->searchLabel = new QLabel(i18n("Search:"), this);
QLabel *searchIcon = new QLabel(this);
- QFileInfo fi(QDir(QDir::homePath()), ".face.icon");
+ const QFileInfo fi(QDir(QDir::homePath()), ".face.icon");
if (fi.exists()) {
searchIcon->setPixmap(QPixmap(fi.absoluteFilePath()).scaled(KIconLoader::SizeMedium, \
KIconLoader::SizeMedium, Qt::KeepAspectRatio)); } else {
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/tabbar.cpp #978773:978774
@@ -103,7 +103,7 @@
m_animateSwitch = animateSwitch;
}
-bool TabBar::animateSwitch()
+bool TabBar::animateSwitch() const
{
return m_animateSwitch;
}
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/tabbar.h #978773:978774
@@ -48,7 +48,7 @@
void setSwitchTabsOnHover(bool switchOnHover);
bool switchTabsOnHover() const;
void setAnimateSwitch(bool animateSwitch);
- bool animateSwitch();
+ bool animateSwitch() const ;
void setShape(Shape shape);
protected:
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/urlitemview.cpp \
#978773:978774 @@ -168,7 +168,7 @@
}
void updateScrollBarRange() {
- int pageSize = q->height();
+ const int pageSize = q->height();
q->verticalScrollBar()->setRange(0, contentsHeight - pageSize);
q->verticalScrollBar()->setPageStep(pageSize);
q->verticalScrollBar()->setSingleStep(q->sizeHintForRow(0));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic