[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:24:57 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=6f4b456
The following commit has been merged in the master branch:
commit 6f4b45693ca35e198618637b2b63a63f788d8188
Author: Aleix Pol <aleixpol at kde.org>
Date: Tue Oct 28 17:09:49 2014 +0100
KIcon -> QIcon
---
app/chat-window.cpp | 77 +++++++++++++++++++-------------------
app/chat-window.h | 5 +--
app/emoticon-text-edit-action.cpp | 2 +-
config/appearance-config.cpp | 4 +-
lib/chat-search-bar.cpp | 6 +--
lib/chat-widget.cpp | 22 +++++------
lib/chat-widget.h | 8 ++--
lib/contact-delegate.cpp | 4 +-
lib/proxy-service.cpp | 2 +-
logviewer/dates-view-delegate.cpp | 2 +-
logviewer/entity-view-delegate.cpp | 2 +-
logviewer/log-viewer.cpp | 14 +++----
logviewer/logs-import-dialog.cpp | 2 +-
13 files changed, 74 insertions(+), 76 deletions(-)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 9877d98..25dc1a0 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -30,7 +30,6 @@
#include <KTp/contact.h>
#include <KStandardAction>
-#include <KIcon>
#include <KLocale>
#include <KApplication>
#include <KAction>
@@ -164,10 +163,10 @@ ChatWindow::~ChatWindow()
void ChatWindow::tabBarContextMenu(int index, const QPoint& globalPos)
{
- KAction close(KIcon(QLatin1String("tab-close"), KIconLoader::global()), i18n("Close"), this);
- KAction dettach(KIcon(QLatin1String("tab-detach"), KIconLoader::global()), i18n("Detach Tab"), this);
- KAction moveLeft(KIcon(QLatin1String("arrow-left"), KIconLoader::global()), i18n("Move Tab Left"), this);
- KAction moveRight(KIcon(QLatin1String("arrow-right"), KIconLoader::global()), i18n("Move Tab Right"), this);
+ KAction close(QIcon::fromTheme(QStringLiteral("tab-close")), i18n("Close"), this);
+ KAction dettach(QIcon::fromTheme(QStringLiteral("tab-detach")), i18n("Detach Tab"), this);
+ KAction moveLeft(QIcon::fromTheme(QStringLiteral("arrow-left")), i18n("Move Tab Left"), this);
+ KAction moveRight(QIcon::fromTheme(QStringLiteral("arrow-right")), i18n("Move Tab Right"), this);
KMenu* menu = new KMenu(this);
@@ -316,7 +315,7 @@ void ChatWindow::setTabText(int index, const QString &newTitle)
}
}
-void ChatWindow::setTabIcon(int index, const KIcon & newIcon)
+void ChatWindow::setTabIcon(int index, const QIcon & newIcon)
{
m_tabWidget->setTabIcon(index, newIcon);
@@ -375,7 +374,7 @@ void ChatWindow::onCurrentIndexChanged(int index)
currentChatTab->acknowledgeMessages();
setWindowTitle(currentChatTab->title());
if (hasUnreadMessages()) {
- setWindowIcon(KIcon(QLatin1String("mail-mark-unread-new")));
+ setWindowIcon(QIcon::fromTheme(QStringLiteral("mail-mark-unread-new")));
} else {
setWindowIcon(currentChatTab->icon());
}
@@ -593,9 +592,9 @@ void ChatWindow::onTabStateChanged()
setTabTextColor(tabIndex, sender->titleColor());
if (TextChatConfig::instance()->showOthersTyping() && (sender->remoteChatState() == Tp::ChannelChatStateComposing)) {
- setTabIcon(tabIndex, KIcon(QLatin1String("document-edit")));
+ setTabIcon(tabIndex, QIcon::fromTheme(QStringLiteral("document-edit")));
if (sender == m_tabWidget->currentWidget()) {
- windowIcon = KIcon(QLatin1String("document-edit"));
+ windowIcon = QIcon::fromTheme(QStringLiteral("document-edit"));
} else {
windowIcon = qobject_cast<ChatTab*>(m_tabWidget->currentWidget())->icon();
}
@@ -605,18 +604,18 @@ void ChatWindow::onTabStateChanged()
}
if (sender->unreadMessageCount() > 0) {
- setTabIcon(tabIndex, KIcon(QLatin1String("mail-mark-unread-new")));
+ setTabIcon(tabIndex, QIcon::fromTheme(QStringLiteral("mail-mark-unread-new")));
}
}
if (hasUnreadMessages()) {
- windowIcon = KIcon(QLatin1String("mail-mark-unread-new"));
+ windowIcon = QIcon::fromTheme(QStringLiteral("mail-mark-unread-new"));
}
setWindowIcon(windowIcon);
}
-void ChatWindow::onTabIconChanged(const KIcon & newIcon)
+void ChatWindow::onTabIconChanged(const QIcon & newIcon)
{
//find out which widget made the call, and update the correct tab.
QWidget* sender = qobject_cast<QWidget*>(QObject::sender());
@@ -774,7 +773,7 @@ void ChatWindow::showNotificationsDialog()
void ChatWindow::removeChatTabSignals(ChatTab *chatTab)
{
disconnect(chatTab, SIGNAL(titleChanged(QString)), this, SLOT(onTabTextChanged(QString)));
- disconnect(chatTab, SIGNAL(iconChanged(KIcon)), this, SLOT(onTabIconChanged(KIcon)));
+ disconnect(chatTab, SIGNAL(iconChanged(QIcon)), this, SLOT(onTabIconChanged(QIcon)));
disconnect(chatTab, SIGNAL(unreadMessagesChanged()), this, SLOT(onTabStateChanged()));
disconnect(chatTab, SIGNAL(contactPresenceChanged(KTp::Presence)), this, SLOT(onTabStateChanged()));
disconnect(chatTab->chatSearchBar(), SIGNAL(enableSearchButtonsSignal(bool)), this, SLOT(onEnableSearchActions(bool)));
@@ -801,7 +800,7 @@ void ChatWindow::sendNotificationToUser(ChatWindow::NotificationType type, const
void ChatWindow::setupChatTabSignals(ChatTab *chatTab)
{
connect(chatTab, SIGNAL(titleChanged(QString)), this, SLOT(onTabTextChanged(QString)));
- connect(chatTab, SIGNAL(iconChanged(KIcon)), this, SLOT(onTabIconChanged(KIcon)));
+ connect(chatTab, SIGNAL(iconChanged(QIcon)), this, SLOT(onTabIconChanged(QIcon)));
connect(chatTab, SIGNAL(userTypingChanged(Tp::ChannelChatState)), this, SLOT(onTabStateChanged()));
connect(chatTab, SIGNAL(unreadMessagesChanged()), this, SLOT(onTabStateChanged()));
connect(chatTab, SIGNAL(contactPresenceChanged(KTp::Presence)), this, SLOT(onTabStateChanged()));
@@ -817,46 +816,46 @@ void ChatWindow::setupCustomActions()
KStandardAction::close(this, SLOT(closeCurrentTab()), this);
KStandardAction::quit(this, SLOT(close()), this);
- KAction *nextTabAction = new KAction(KIcon(QLatin1String("go-next-view")), i18n("&Next Tab"), this);
+ KAction *nextTabAction = new KAction(QIcon::fromTheme(QStringLiteral("go-next-view")), i18n("&Next Tab"), this);
nextTabAction->setShortcuts(KStandardShortcut::tabNext());
connect(nextTabAction, SIGNAL(triggered()), this, SLOT(onNextTabActionTriggered()));
- KAction *previousTabAction = new KAction(KIcon(QLatin1String("go-previous-view")), i18n("&Previous Tab"), this);
+ KAction *previousTabAction = new KAction(QIcon::fromTheme(QStringLiteral("go-previous-view")), i18n("&Previous Tab"), this);
previousTabAction->setShortcuts(KStandardShortcut::tabPrev());
connect(previousTabAction, SIGNAL(triggered()), this, SLOT(onPreviousTabActionTriggered()));
- KAction *audioCallAction = new KAction(KIcon(QLatin1String("audio-headset")), i18n("&Audio Call"), this);
+ KAction *audioCallAction = new KAction(QIcon::fromTheme(QStringLiteral("audio-headset")), i18n("&Audio Call"), this);
audioCallAction->setToolTip(i18nc("Toolbar icon tooltip", "Start an audio call with this contact"));
connect(audioCallAction, SIGNAL(triggered()), this, SLOT(onAudioCallTriggered()));
- KAction *blockContactAction = new KAction(KIcon(QLatin1String("im-ban-kick-user")), i18n("&Block Contact"), this);
+ KAction *blockContactAction = new KAction(QIcon::fromTheme(QStringLiteral("im-ban-kick-user")), i18n("&Block Contact"), this);
blockContactAction->setToolTip(i18nc("Toolbar icon tooltip",
"Blocking means that this contact will not see you online and you will not receive any messages from this contact"));
connect(blockContactAction, SIGNAL(triggered()), this, SLOT(onBlockContactTriggered()));
- KAction *fileTransferAction = new KAction(KIcon(QLatin1String("mail-attachment")), i18n("&Send File"), this);
+ KAction *fileTransferAction = new KAction(QIcon::fromTheme(QStringLiteral("mail-attachment")), i18n("&Send File"), this);
fileTransferAction->setToolTip(i18nc("Toolbar icon tooltip", "Send a file to this contact"));
connect(fileTransferAction, SIGNAL(triggered()), this, SLOT(onFileTransferTriggered()));
- KAction *inviteToChat = new KAction(KIcon(QLatin1String("user-group-new")), i18n("&Invite to Chat"), this);
+ KAction *inviteToChat = new KAction(QIcon::fromTheme(QStringLiteral("user-group-new")), i18n("&Invite to Chat"), this);
inviteToChat->setToolTip(i18nc("Toolbar icon tooltip", "Invite another contact to join this chat"));
connect(inviteToChat, SIGNAL(triggered()), this, SLOT(onInviteToChatTriggered()));
- KAction *videoCallAction = new KAction(KIcon(QLatin1String("camera-web")), i18n("&Video Call"), this);
+ KAction *videoCallAction = new KAction(QIcon::fromTheme(QStringLiteral("camera-web")), i18n("&Video Call"), this);
videoCallAction->setToolTip(i18nc("Toolbar icon tooltip", "Start a video call with this contact"));
connect(videoCallAction, SIGNAL(triggered()), this, SLOT(onVideoCallTriggered()));
- KAction *shareDesktopAction = new KAction(KIcon(QLatin1String("krfb")), i18n("Share My &Desktop"), this);
+ KAction *shareDesktopAction = new KAction(QIcon::fromTheme(QStringLiteral("krfb")), i18n("Share My &Desktop"), this);
shareDesktopAction->setToolTip(i18nc("Toolbar icon tooltip", "Start an application that allows this contact to see your desktop"));
connect(shareDesktopAction, SIGNAL(triggered()), this, SLOT(onShareDesktopTriggered()));
- KAction* collaborateDocumentAction = new KAction(KIcon(QLatin1String("document-share")), i18n("&Collaboratively edit a document"), this);
+ KAction* collaborateDocumentAction = new KAction(QIcon::fromTheme(QStringLiteral("document-share")), i18n("&Collaboratively edit a document"), this);
connect(collaborateDocumentAction, SIGNAL(triggered()), this, SLOT(onCollaborateDocumentTriggered()));
- KAction* showInfoAction = new KAction(KIcon(QLatin1String("view-pim-contacts")), i18n("&Contact info"), this);
+ KAction* showInfoAction = new KAction(QIcon::fromTheme(QStringLiteral("view-pim-contacts")), i18n("&Contact info"), this);
connect(showInfoAction, SIGNAL(triggered()), this, SLOT(onShowInfoTriggered()));
- KAction* leaveAction = new KAction(KIcon(QLatin1String("irc-close-channel")), i18n("&Leave room"), this);
+ KAction* leaveAction = new KAction(QIcon::fromTheme(QStringLiteral("irc-close-channel")), i18n("&Leave room"), this);
connect(leaveAction, SIGNAL(triggered()), this, SLOT(onLeaveChannelTriggered()));
m_spellDictCombo = new Sonnet::DictionaryComboBox();
@@ -866,20 +865,20 @@ void ChatWindow::setupCustomActions()
QWidgetAction *spellDictComboAction = new QWidgetAction(this);
spellDictComboAction->setDefaultWidget(m_spellDictCombo);
spellDictComboAction->defaultWidget()->setFocusPolicy(Qt::ClickFocus);
- spellDictComboAction->setIcon(KIcon(QLatin1String("tools-check-spelling")));
+ spellDictComboAction->setIcon(QIcon::fromTheme(QStringLiteral("tools-check-spelling")));
spellDictComboAction->setIconText(i18n("Choose Spelling Language"));
- KAction *openLogAction = new KAction(KIcon(QLatin1String("view-pim-journal")), i18nc("Action to open the log viewer with a specified contact","&Previous Conversations"), this);
+ KAction *openLogAction = new KAction(QIcon::fromTheme(QStringLiteral("view-pim-journal")), i18nc("Action to open the log viewer with a specified contact","&Previous Conversations"), this);
connect(openLogAction, SIGNAL(triggered()), SLOT(onOpenLogTriggered()));
- KAction *openContactListAction = new KAction(KIcon(QLatin1String("telepathy-kde")), i18nc("Action to open the contact list","Contact &List"), this);
+ KAction *openContactListAction = new KAction(QIcon::fromTheme(QStringLiteral("telepathy-kde")), i18nc("Action to open the contact list","Contact &List"), this);
connect(openContactListAction, SIGNAL(triggered()), SLOT(onOpenContactListTriggered()));
- KAction *accountIconAction = new KAction(KIcon(QLatin1String("telepathy-kde")), i18n("Account Icon"), this);
+ KAction *accountIconAction = new KAction(QIcon::fromTheme(QStringLiteral("telepathy-kde")), i18n("Account Icon"), this);
m_accountIconLabel = new QLabel(this);
accountIconAction->setDefaultWidget(m_accountIconLabel);
- KAction *clearViewAction = new KAction(KIcon(QLatin1String("edit-clear-history")), i18n("&Clear View"), this);
+ KAction *clearViewAction = new KAction(QIcon::fromTheme(QStringLiteral("edit-clear-history")), i18n("&Clear View"), this);
clearViewAction->setToolTip(i18nc("Toolbar icon tooltip", "Clear all messages from current chat tab"));
connect(clearViewAction, SIGNAL(triggered()), this, SLOT(onClearViewTriggered()));
@@ -918,18 +917,18 @@ void ChatWindow::setupCustomActions()
void ChatWindow::setupOTR()
{
- m_otrActionMenu = new KActionMenu(KIcon(QLatin1String("object-unlocked")), i18n("&OTR"), this);
+ m_otrActionMenu = new KActionMenu(QIcon::fromTheme(QStringLiteral("object-unlocked")), i18n("&OTR"), this);
m_otrActionMenu->setDelayed(false);
- KAction *startRestartOtrAction = new KAction(KIcon(QLatin1String("object-locked")), i18n("&Start session"), this);
+ KAction *startRestartOtrAction = new KAction(QIcon::fromTheme(QStringLiteral("object-locked")), i18n("&Start session"), this);
startRestartOtrAction->setEnabled(false);
connect(startRestartOtrAction, SIGNAL(triggered()), this, SLOT(onStartRestartOtrTriggered()));
- KAction *stopOtrAction = new KAction(KIcon(QLatin1String("object-unlocked")), i18n("&Stop session"), this);
+ KAction *stopOtrAction = new KAction(QIcon::fromTheme(QStringLiteral("object-unlocked")), i18n("&Stop session"), this);
stopOtrAction->setEnabled(false);
connect(stopOtrAction, SIGNAL(triggered()), this, SLOT(onStopOtrTriggered()));
- KAction *authenticateBuddyAction = new KAction(KIcon(QLatin1String("application-pgp-signature")), i18n("&Authenticate contact"), this);
+ KAction *authenticateBuddyAction = new KAction(QIcon::fromTheme(QStringLiteral("application-pgp-signature")), i18n("&Authenticate contact"), this);
authenticateBuddyAction->setEnabled(false);
connect(authenticateBuddyAction, SIGNAL(triggered()), this, SLOT(onAuthenticateBuddyTriggered()));
@@ -966,7 +965,7 @@ void ChatWindow::onOtrStatusChanged(OtrStatus status)
// OTR is disabled for this channel
if(!status) {
m_otrActionMenu->setEnabled(false);
- m_otrActionMenu->menu()->setIcon(KIcon(QLatin1String("object-unlocked")));
+ m_otrActionMenu->menu()->setIcon(QIcon::fromTheme(QStringLiteral("object-unlocked")));
return;
}
@@ -979,7 +978,7 @@ void ChatWindow::onOtrStatusChanged(OtrStatus status)
switch(status.otrTrustLevel()) {
case KTp::OTRTrustLevelNotPrivate:
- m_otrActionMenu->setIcon(KIcon(QLatin1String("object-unlocked")));
+ m_otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-unlocked")));
m_otrActionMenu->setToolTip(i18n("Not private"));
srAction->setEnabled(true);
srAction->setText(i18n("&Start session"));
@@ -988,7 +987,7 @@ void ChatWindow::onOtrStatusChanged(OtrStatus status)
return;
case KTp::OTRTrustLevelUnverified:
- m_otrActionMenu->setIcon(KIcon(QLatin1String("object-locked-unverified")));
+ m_otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-unverified")));
m_otrActionMenu->setToolTip(i18n("Unverified"));
srAction->setEnabled(true);
srAction->setText(i18n("&Restart session"));
@@ -997,7 +996,7 @@ void ChatWindow::onOtrStatusChanged(OtrStatus status)
return;
case KTp::OTRTrustLevelPrivate:
- m_otrActionMenu->setIcon(KIcon(QLatin1String("object-locked-verified")));
+ m_otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-verified")));
m_otrActionMenu->setToolTip(i18n("Private"));
srAction->setEnabled(true);
srAction->setText(i18n("&Restart session"));
@@ -1006,7 +1005,7 @@ void ChatWindow::onOtrStatusChanged(OtrStatus status)
return;
case KTp::OTRTrustLevelFinished:
- m_otrActionMenu->setIcon(KIcon(QLatin1String("object-locked-finished")));
+ m_otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-finished")));
m_otrActionMenu->setToolTip(i18n("Finished"));
srAction->setEnabled(true);
srAction->setText(i18n("&Restart session"));
diff --git a/app/chat-window.h b/app/chat-window.h
index dbef04c..f85b3fd 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -34,7 +34,6 @@ namespace Sonnet {
class DictionaryComboBox;
}
-class KIcon;
class ChatTab;
class QLabel;
class QDBusPendingCallWatcher;
@@ -54,7 +53,7 @@ public:
void destroyTab(ChatTab *tab);
void setTabText(int index, const QString &newTitle);
- void setTabIcon(int index, const KIcon &newIcon);
+ void setTabIcon(int index, const QIcon &newIcon);
void setTabTextColor(int index,const QColor &color);
/** retrieves tab with given textChannel if it exists
@@ -102,7 +101,7 @@ private Q_SLOTS:
void onSearchActionToggled(); /** toggle search bar visibility */
void onTabStateChanged();
void onTabTextChanged(const QString &newTitle);
- void onTabIconChanged(const KIcon &newIcon);
+ void onTabIconChanged(const QIcon &newIcon);
void onVideoCallTriggered(); /** start a video call */
void onUnblockContactTriggered(); /** Unblocks contact when already blocked */
void onShareDesktopTriggered(); /** start a desktop share */
diff --git a/app/emoticon-text-edit-action.cpp b/app/emoticon-text-edit-action.cpp
index f1250cf..10de010 100644
--- a/app/emoticon-text-edit-action.cpp
+++ b/app/emoticon-text-edit-action.cpp
@@ -50,7 +50,7 @@ EmoticonTextEditAction::EmoticonTextEditAction( QObject * parent )
: KActionMenu( i18n( "Add Smiley" ), parent ), d( new EmoticonTextEditActionPrivate() )
{
setMenu( d->emoticonMenu );
- setIcon( KIcon( QLatin1String( "face-smile" ) ) );
+ setIcon( QIcon::fromTheme( QStringLiteral( "face-smile" ) ) );
setDelayed( false );
connect( d->selector, SIGNAL(itemSelected(QString)),
this, SIGNAL(emoticonActivated(QString)) );
diff --git a/config/appearance-config.cpp b/config/appearance-config.cpp
index e28d97f..7855523 100644
--- a/config/appearance-config.cpp
+++ b/config/appearance-config.cpp
@@ -49,11 +49,11 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const QVariantList &args)
KTabWidget *tabWidget = new KTabWidget(this);
m_singleTab = new AppearanceConfigTab(this, AppearanceConfigTab::NormalChat);
- tabWidget->addTab(m_singleTab, KIcon(), i18nc("@title:tab", "Normal Chat"));
+ tabWidget->addTab(m_singleTab, QIcon(), i18nc("@title:tab", "Normal Chat"));
connect(m_singleTab, SIGNAL(tabChanged()), this, SLOT(changed()));
m_groupTab = new AppearanceConfigTab(this, AppearanceConfigTab::GroupChat);
- tabWidget->addTab(m_groupTab, KIcon(), i18nc("@title:tab", "Group Chat"));
+ tabWidget->addTab(m_groupTab, QIcon(), i18nc("@title:tab", "Group Chat"));
connect(m_groupTab, SIGNAL(tabChanged()), this, SLOT(changed()));
topLayout->addWidget(tabWidget, 0, 0);
diff --git a/lib/chat-search-bar.cpp b/lib/chat-search-bar.cpp
index d9cacd4..522ac66 100644
--- a/lib/chat-search-bar.cpp
+++ b/lib/chat-search-bar.cpp
@@ -37,13 +37,13 @@ ChatSearchBar::ChatSearchBar(QWidget *parent)
: QWidget(parent)
, m_searchInput(new KLineEdit(this))
, m_closeButton(new QToolButton(this))
- , m_nextButton(new KPushButton(KIcon(QLatin1String("go-down-search")), i18nc("Next search result" ,"&Next"), this))
- , m_previousButton(new KPushButton(KIcon(QLatin1String("go-up-search")), i18nc("Previous search result" ,"&Previous"), this))
+ , m_nextButton(new KPushButton(QIcon::fromTheme(QStringLiteral("go-down-search")), i18nc("Next search result" ,"&Next"), this))
+ , m_previousButton(new KPushButton(QIcon::fromTheme(QStringLiteral("go-up-search")), i18nc("Previous search result" ,"&Previous"), this))
, m_caseSensitive(false)
{
// close button setup
m_closeButton->setAutoRaise(true);
- m_closeButton->setIcon(KIcon(QLatin1String("dialog-close")));
+ m_closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
connect(m_closeButton, SIGNAL(clicked(bool)), this, SLOT(toggleView(bool)));
// search line setup
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index 3f4b2ab..81ea549 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -157,11 +157,11 @@ ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr
d->ui.setupUi(this);
if (d->isGroupChat) {
d->contactsMenu = new QMenu(this);
- QAction *action = d->contactsMenu->addAction(KIcon::fromTheme(QLatin1String("text-x-generic")),
+ QAction *action = d->contactsMenu->addAction(QIcon::fromTheme(QLatin1String("text-x-generic")),
i18n("Open chat window"),
this, SLOT(onOpenContactChatWindowClicked()));
action->setObjectName(QLatin1String("OpenChatWindowAction"));
- action = d->contactsMenu->addAction(KIcon::fromTheme(QLatin1String("mail-attachment")),
+ action = d->contactsMenu->addAction(QIcon::fromTheme(QLatin1String("mail-attachment")),
i18n("Send file"),
this, SLOT(onSendFileClicked()));
action->setObjectName(QLatin1String("SendFileAction"));
@@ -180,9 +180,9 @@ ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr
d->fileResourceTransferMenu = new QMenu(this);
// This action's text is going to be changed in the dropEvent method to add the destination image service.
- d->shareImageMenuAction = new QAction(KIcon::fromTheme(QLatin1String("insert-image")), i18n("Share Image"), this);
+ d->shareImageMenuAction = new QAction(QIcon::fromTheme(QLatin1String("insert-image")), i18n("Share Image"), this);
connect(d->shareImageMenuAction, SIGNAL(triggered(bool)), this, SLOT(onShareImageMenuActionTriggered()));
- d->fileTransferMenuAction = new QAction(KIcon::fromTheme(QLatin1String("mail-attachment")), i18n("Send File"), this);
+ d->fileTransferMenuAction = new QAction(QIcon::fromTheme(QLatin1String("mail-attachment")), i18n("Send File"), this);
d->fileTransferMenuAction->setEnabled(targetContact && targetContact->fileTransferCapability());
d->fileResourceTransferMenu->addAction(d->fileTransferMenuAction);
@@ -302,14 +302,14 @@ Tp::AccountPtr ChatWidget::account() const
return d->account;
}
-KIcon ChatWidget::icon() const
+QIcon ChatWidget::icon() const
{
if (!d->isGroupChat) {
if (d->account->currentPresence() != Tp::Presence::offline()) {
//normal chat - self and one other person.
//find the other contact which isn't self.
Tp::ContactPtr otherContact = d->channel->textChannel()->targetContact();
- KIcon presenceIcon = KTp::Presence(otherContact->presence()).icon();
+ QIcon presenceIcon = KTp::Presence(otherContact->presence()).icon();
if (otherContact->clientTypes().contains(QLatin1String("phone"))) {
//we paint a warning symbol in the right-bottom corner
@@ -317,7 +317,7 @@ KIcon ChatWidget::icon() const
QPixmap pixmap = presenceIcon.pixmap(32, 32);
QPainter painter(&pixmap);
painter.drawPixmap(8, 8, 24, 24, phonePixmap);
- return KIcon(pixmap);
+ return QIcon(pixmap);
}
return presenceIcon;
} else {
@@ -326,16 +326,16 @@ KIcon ChatWidget::icon() const
} else {
//group chat
if (d->account->currentPresence() != Tp::Presence::offline()) {
- return KIcon(groupChatOnlineIcon);
+ return QIcon::fromTheme(groupChatOnlineIcon);
} else {
- return KIcon(groupChatOfflineIcon);
+ return QIcon::fromTheme(groupChatOfflineIcon);
}
}
}
-KIcon ChatWidget::accountIcon() const
+QIcon ChatWidget::accountIcon() const
{
- return KIcon(d->account->iconName());
+ return QIcon::fromTheme(d->account->iconName());
}
bool ChatWidget::isGroupChat() const
diff --git a/lib/chat-widget.h b/lib/chat-widget.h
index 1a5c778..fd50aa3 100644
--- a/lib/chat-widget.h
+++ b/lib/chat-widget.h
@@ -30,7 +30,7 @@
#include <QWidget>
#include <QWebPage>
-#include <KIcon>
+#include <QIcon>
#include <KColorScheme>
#include <KShortcut>
@@ -61,10 +61,10 @@ public:
ChatSearchBar* chatSearchBar() const;
/** Returns the icon of this chat window */
- KIcon icon() const;
+ QIcon icon() const;
/** Returns the icon for the account used in this chat window */
- KIcon accountIcon() const;
+ QIcon accountIcon() const;
/** returns whether the chat is considered a group chat */
bool isGroupChat() const;
@@ -185,7 +185,7 @@ Q_SIGNALS:
void titleChanged(const QString &title);
/** Emmitted if the icon for this channel changes*/
- void iconChanged(const KIcon &icon);
+ void iconChanged(const QIcon &icon);
/** Emmited whenever a message is received in this channel. It is up to the parent application to acknowledge these messages*/
void messageReceived(const Tp::ReceivedMessage &message);
diff --git a/lib/contact-delegate.cpp b/lib/contact-delegate.cpp
index 7b26da1..478c7e3 100644
--- a/lib/contact-delegate.cpp
+++ b/lib/contact-delegate.cpp
@@ -74,7 +74,7 @@ void ContactDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
QPixmap avatar;
if (index.data(ChannelContactModel::IsTypingRole).toBool()) {
- avatar = KIcon(QLatin1String("document-edit")).pixmap(KIconLoader::SizeSmallMedium);
+ avatar = QIcon::fromTheme(QStringLiteral("document-edit")).pixmap(KIconLoader::SizeSmallMedium);
} else {
avatar = qvariant_cast<QPixmap>(index.data(KTp::ContactAvatarPixmapRole));
}
@@ -86,7 +86,7 @@ void ContactDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
// This value is used to set the correct width for the username and the presence message.
int rightIconsWidth = m_presenceIconSize + m_spacing;
- QPixmap icon = KIcon(index.data(KTp::ContactPresenceIconRole).toString()).pixmap(KIconLoader::SizeSmallMedium);
+ QPixmap icon = QIcon::fromTheme(index.data(KTp::ContactPresenceIconRole).toString()).pixmap(KIconLoader::SizeSmallMedium);
QRect statusIconRect = optV4.rect;
diff --git a/lib/proxy-service.cpp b/lib/proxy-service.cpp
index 271070b..5179549 100644
--- a/lib/proxy-service.cpp
+++ b/lib/proxy-service.cpp
@@ -44,7 +44,7 @@ class KeyGenDialog : public KDialog
this->setCaption(i18n("Please wait"));
this->setButtons(KDialog::Ok);
this->enableButton(KDialog::Ok, false);
- ui.keyIcon->setPixmap(KIcon(QLatin1String("dialog-password")).pixmap( 48, 48 ));
+ ui.keyIcon->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-password")).pixmap( 48, 48 ));
}
~KeyGenDialog()
{
diff --git a/logviewer/dates-view-delegate.cpp b/logviewer/dates-view-delegate.cpp
index 26706b0..f15d9fc 100644
--- a/logviewer/dates-view-delegate.cpp
+++ b/logviewer/dates-view-delegate.cpp
@@ -183,7 +183,7 @@ void DatesViewDelegate::paintItem(QPainter* painter, const QStyleOptionViewItem&
const Tp::AccountPtr &account = index.data(DatesModel::AccountRole).value<Tp::AccountPtr>();
if (account) {
- const QPixmap accountIcon = KIcon(account->iconName()).pixmap(iconSize);
+ const QPixmap accountIcon = QIcon::fromTheme(account->iconName()).pixmap(iconSize);
QRect accountIconRect = optV4.rect;
accountIconRect.adjust(optV4.rect.width() - iconSize - m_spacing, 0, 0, 0);
style->drawItemPixmap(painter, accountIconRect, 0, accountIcon);
diff --git a/logviewer/entity-view-delegate.cpp b/logviewer/entity-view-delegate.cpp
index eb6bde1..36854e7 100644
--- a/logviewer/entity-view-delegate.cpp
+++ b/logviewer/entity-view-delegate.cpp
@@ -131,7 +131,7 @@ void EntityViewDelegate::paintContact(QPainter* painter, const QStyleOptionViewI
const Tp::AccountPtr &account = index.data(KTp::AccountRole).value<Tp::AccountPtr>();
if (isEntity && account) {
- const QPixmap accountIcon = KIcon(account->iconName()).pixmap(m_avatarSize);
+ const QPixmap accountIcon = QIcon::fromTheme(account->iconName()).pixmap(m_avatarSize);
QRect accountIconRect = optV4.rect;
accountIconRect.adjust(optV4.rect.width() - m_avatarSize - m_spacing, 0, 0, 0);
style->drawItemPixmap(painter, accountIconRect, 0, accountIcon);
diff --git a/logviewer/log-viewer.cpp b/logviewer/log-viewer.cpp
index d13edb4..d7c78c3 100644
--- a/logviewer/log-viewer.cpp
+++ b/logviewer/log-viewer.cpp
@@ -70,7 +70,7 @@ LogViewer::LogViewer(const Tp::AccountFactoryPtr &accountFactory, const Tp::Conn
KXmlGuiWindow(parent),
ui(new Ui::LogViewer)
{
- setWindowIcon(KIcon(QLatin1String("documentation")));
+ setWindowIcon(QIcon::fromTheme(QStringLiteral("documentation")));
QWidget *widget = new QWidget(this);
setCentralWidget(widget);
@@ -133,31 +133,31 @@ void LogViewer::setupActions()
KStandardAction::showMenubar(this->menuBar(), SLOT(setVisible(bool)), actionCollection());
KAction *configure = new KAction(i18n("&Configure LogViewer"), this);
- configure->setIcon(KIcon(QLatin1String("configure")));
+ configure->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
connect(configure, SIGNAL(triggered(bool)), SLOT(slotConfigure()));
KAction *clearAccHistory = new KAction(i18n("Clear &account history"), this);
- clearAccHistory->setIcon(KIcon(QLatin1String("edit-clear-history")));
+ clearAccHistory->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-history")));
connect(clearAccHistory, SIGNAL(triggered(bool)), SLOT(slotClearAccountHistory()));
KAction *clearContactHistory = new KAction(i18n("Clear &contact history"), this);
- clearContactHistory->setIcon(KIcon(QLatin1String("edit-clear-history")));
+ clearContactHistory->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-history")));
clearContactHistory->setEnabled(false);
connect(clearContactHistory, SIGNAL(triggered(bool)), SLOT(slotClearContactHistory()));
KAction *importKopeteLogs = new KAction(i18n("&Import Kopete Logs"), this);
- importKopeteLogs->setIcon(KIcon(QLatin1String("document-import")));
+ importKopeteLogs->setIcon(QIcon::fromTheme(QStringLiteral("document-import")));
connect(importKopeteLogs, SIGNAL(triggered(bool)), SLOT(slotImportKopeteLogs()));
KAction *prevConversation = new KAction(i18n("&Previous Conversation"), this);
prevConversation->setShortcut(KShortcut(Qt::CTRL + Qt::Key_P));
- prevConversation->setIcon(KIcon(QLatin1String("go-previous")));
+ prevConversation->setIcon(QIcon::fromTheme(QStringLiteral("go-previous")));
prevConversation->setEnabled(false);
connect(prevConversation, SIGNAL(triggered(bool)), SLOT(slotJumpToPrevConversation()));
KAction *nextConversation = new KAction(i18n("&Next Conversation"), this);
nextConversation->setShortcut(KShortcut(Qt::CTRL + Qt::Key_N));
- nextConversation->setIcon(KIcon(QLatin1String("go-next")));
+ nextConversation->setIcon(QIcon::fromTheme(QStringLiteral("go-next")));
nextConversation->setEnabled(false);
connect(nextConversation, SIGNAL(triggered(bool)), SLOT(slotJumpToNextConversation()));
diff --git a/logviewer/logs-import-dialog.cpp b/logviewer/logs-import-dialog.cpp
index 39fc7e7..b145e21 100644
--- a/logviewer/logs-import-dialog.cpp
+++ b/logviewer/logs-import-dialog.cpp
@@ -81,7 +81,7 @@ void LogsImportDialog::importLogs(const QList< Tp::AccountPtr >& accounts)
Q_FOREACH(const Tp::AccountPtr &account, accounts) {
QListWidgetItem *item = new QListWidgetItem();
item->setText(account->displayName());
- item->setIcon(KIcon(account->iconName()));
+ item->setIcon(QIcon::fromTheme(account->iconName()));
item->setCheckState(Qt::Checked);
item->setData(Qt::UserRole + 1, QVariant::fromValue(account));
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list