mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
Fix compile
deprecated-- svn path=/trunk/playground/utils/dolphin/; revision=629105
This commit is contained in:
parent
c8b837a47b
commit
17e8c553de
|
@ -407,7 +407,8 @@ void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoT
|
||||||
|
|
||||||
QLabel* info = new QLabel(infoText, m_infoGrid);
|
QLabel* info = new QLabel(infoText, m_infoGrid);
|
||||||
info->setTextFormat(Qt::RichText);
|
info->setTextFormat(Qt::RichText);
|
||||||
info->setAlignment(Qt::AlignTop | Qt::TextWordWrap);
|
info->setAlignment(Qt::AlignTop);
|
||||||
|
info->setWordWrap(true);
|
||||||
info->show();
|
info->show();
|
||||||
m_infoWidgets.append(info);
|
m_infoWidgets.append(info);
|
||||||
|
|
||||||
|
@ -448,13 +449,13 @@ void InfoSidebarPage::insertActions()
|
||||||
QStringList dirs = KGlobal::dirs()->findDirs("data", "dolphin/servicemenus/");
|
QStringList dirs = KGlobal::dirs()->findDirs("data", "dolphin/servicemenus/");
|
||||||
for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
|
for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
|
||||||
QDir dir(*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) {
|
for (QStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) {
|
||||||
KSimpleConfig cfg(*dirIt + *entryIt, true);
|
KSimpleConfig cfg(*dirIt + *entryIt, true);
|
||||||
cfg.setDesktopGroup();
|
cfg.setDesktopGroup();
|
||||||
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
|
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) {
|
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
|
||||||
// check whether the mime type is equal or whether the
|
// check whether the mime type is equal or whether the
|
||||||
// mimegroup (e. g. image/*) is supported
|
// mimegroup (e. g. image/*) is supported
|
||||||
|
@ -512,7 +513,7 @@ void InfoSidebarPage::insertActions()
|
||||||
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
|
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
|
||||||
KDEDesktopMimeType::Service service = (*serviceIt);
|
KDEDesktopMimeType::Service service = (*serviceIt);
|
||||||
if (popup == 0) {
|
if (popup == 0) {
|
||||||
ServiceButton* button = new ServiceButton(SmallIcon(service.m_strIcon),
|
ServiceButton* button = new ServiceButton(KIcon(service.m_strIcon),
|
||||||
service.m_strName,
|
service.m_strName,
|
||||||
m_actionBox,
|
m_actionBox,
|
||||||
actionsIndex);
|
actionsIndex);
|
||||||
|
@ -522,7 +523,7 @@ void InfoSidebarPage::insertActions()
|
||||||
button->show();
|
button->show();
|
||||||
}
|
}
|
||||||
else {
|
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);
|
m_actionsVector.append(service);
|
||||||
|
@ -580,9 +581,9 @@ void ServiceButton::paintEvent(QPaintEvent* event)
|
||||||
// draw icon
|
// draw icon
|
||||||
int x = spacing;
|
int x = spacing;
|
||||||
const int y = (buttonHeight - K3Icon::SizeSmall) / 2;
|
const int y = (buttonHeight - K3Icon::SizeSmall) / 2;
|
||||||
const QIcon* set = iconSet();
|
const QIcon &set = icon();
|
||||||
if (set != 0) {
|
if (!set.isNull()) {
|
||||||
painter.drawPixmap(x, y, set->pixmap(QIcon::Small, QIcon::Normal));
|
painter.drawPixmap(x, y, set.pixmap(QIcon::Small, QIcon::Normal));
|
||||||
}
|
}
|
||||||
x += K3Icon::SizeSmall + spacing;
|
x += K3Icon::SizeSmall + spacing;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kstandarddirs.h>
|
#include <kstandarddirs.h>
|
||||||
#include <kurl.h>
|
#include <kurl.h>
|
||||||
#include <kinstance.h>
|
#include <kcomponentdata.h>
|
||||||
|
|
||||||
#include "viewproperties.h"
|
#include "viewproperties.h"
|
||||||
#include "dolphinsettings.h"
|
#include "dolphinsettings.h"
|
||||||
|
|
Loading…
Reference in a new issue