From kde-commits Thu Feb 01 12:05:22 2007 From: Stefan Gehn Date: Thu, 01 Feb 2007 12:05:22 +0000 To: kde-commits Subject: playground/utils/dolphin/src Message-Id: <1170331522.102917.31507.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=117033154127254 SVN commit 629105 by metz: Fix compile deprecated-- M +9 -8 infosidebarpage.cpp M +1 -1 viewproperties.cpp --- trunk/playground/utils/dolphin/src/infosidebarpage.cpp #629104:629105 @@ -407,7 +407,8 @@ QLabel* info = new QLabel(infoText, m_infoGrid); info->setTextFormat(Qt::RichText); - info->setAlignment(Qt::AlignTop | Qt::TextWordWrap); + info->setAlignment(Qt::AlignTop); + info->setWordWrap(true); info->show(); m_infoWidgets.append(info); @@ -448,13 +449,13 @@ QStringList dirs = KGlobal::dirs()->findDirs("data", "dolphin/servicemenus/"); for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { QDir dir(*dirIt); - QStringList entries = dir.entryList("*.desktop", QDir::Files); + QStringList entries = dir.entryList(QStringList("*.desktop"), QDir::Files); for (QStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) { KSimpleConfig cfg(*dirIt + *entryIt, true); cfg.setDesktopGroup(); if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) { - const QStringList types = cfg.readListEntry("ServiceTypes", ','); + const QStringList types = cfg.readEntry("ServiceTypes", QStringList(), ','); for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { // check whether the mime type is equal or whether the // mimegroup (e. g. image/*) is supported @@ -512,7 +513,7 @@ for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) { KDEDesktopMimeType::Service service = (*serviceIt); if (popup == 0) { - ServiceButton* button = new ServiceButton(SmallIcon(service.m_strIcon), + ServiceButton* button = new ServiceButton(KIcon(service.m_strIcon), service.m_strName, m_actionBox, actionsIndex); @@ -522,7 +523,7 @@ button->show(); } else { - popup->insertItem(SmallIcon(service.m_strIcon), service.m_strName, actionsIndex); + popup->insertItem(KIcon(service.m_strIcon), service.m_strName, actionsIndex); } m_actionsVector.append(service); @@ -580,9 +581,9 @@ // draw icon int x = spacing; const int y = (buttonHeight - K3Icon::SizeSmall) / 2; - const QIcon* set = iconSet(); - if (set != 0) { - painter.drawPixmap(x, y, set->pixmap(QIcon::Small, QIcon::Normal)); + const QIcon &set = icon(); + if (!set.isNull()) { + painter.drawPixmap(x, y, set.pixmap(QIcon::Small, QIcon::Normal)); } x += K3Icon::SizeSmall + spacing; --- trunk/playground/utils/dolphin/src/viewproperties.cpp #629104:629105 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "viewproperties.h" #include "dolphinsettings.h"