[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:25:04 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=7e7e380
The following commit has been merged in the master branch:
commit 7e7e3804ce998b756533f3312873002bfd7293b8
Author: Martin Klapetek <mklapetek at kde.org>
Date: Fri Jan 9 15:51:02 2015 +0100
Port all config kcm modules away from KDELibs4Support
The kDebugs served no purpose here really so they got mostly all removed
---
config/CMakeLists.txt | 9 +++++----
config/appearance-config-tab.cpp | 4 ++--
config/appearance-config.cpp | 10 ++--------
config/appearance-config.ui | 23 ++++-------------------
config/behavior-config.cpp | 20 +++++++++-----------
config/behavior-config.ui | 24 +++++++++---------------
config/messages-config.cpp | 2 --
config/otr-config.cpp | 28 ++++++++--------------------
8 files changed, 39 insertions(+), 81 deletions(-)
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 06ef4f9..8bb61eb 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -23,26 +23,27 @@ add_library(kcm_ktp_chat_otr MODULE ${kcm_ktp_chat_otr_SRCS})
target_link_libraries(kcm_ktp_chat_appearance
Qt5::WebKitWidgets
KF5::KCMUtils
- KF5::KDELibs4Support
+ KF5::WidgetsAddons
+ KF5::IconThemes
ktpchat
)
target_link_libraries(kcm_ktp_chat_behavior
- KF5::KDELibs4Support
+ KF5::TextWidgets
KF5::KCMUtils
ktpchat
ktpimagesharer
)
target_link_libraries(kcm_ktp_chat_messages
- KF5::KDELibs4Support
KF5::KCMUtils
KTp::CommonInternals
ktpchat
)
target_link_libraries(kcm_ktp_chat_otr
+ KF5::KCMUtils
+ KF5::WidgetsAddons
KTp::CommonInternals
KTp::OTR
- KF5::KDELibs4Support
ktpchat
)
diff --git a/config/appearance-config-tab.cpp b/config/appearance-config-tab.cpp
index 9077599..f2f298b 100644
--- a/config/appearance-config-tab.cpp
+++ b/config/appearance-config-tab.cpp
@@ -154,7 +154,7 @@ void AppearanceConfigTab::onStylesLoaded()
ui->styleComboBox->addItem(i.value(), i.key());
if (i.key() == currentStyle->id()) {
- ui->styleComboBox->setCurrentItem(i.value());
+ ui->styleComboBox->setCurrentIndex(ui->styleComboBox->count() - 1);
}
++i;
@@ -281,7 +281,7 @@ void AppearanceConfigTab::updateVariantsList()
QHash<QString, QString> variants = ui->chatView->chatStyle()->getVariants();
ui->variantComboBox->clear();
ui->variantComboBox->addItems(variants.keys());
- ui->variantComboBox->setCurrentItem(ui->chatView->variantName());
+ ui->variantComboBox->setCurrentIndex(ui->variantComboBox->findText(ui->chatView->variantName()));
}
void AppearanceConfigTab::saveTab(KConfigGroup appearanceConfigGroup)
diff --git a/config/appearance-config.cpp b/config/appearance-config.cpp
index fa85572..1a63988 100644
--- a/config/appearance-config.cpp
+++ b/config/appearance-config.cpp
@@ -21,7 +21,7 @@
#include "ui_appearance-config.h"
#include "appearance-config-tab.h"
-#include <KTabWidget>
+#include <QTabWidget>
#include "chat-window-style-manager.h"
#include "chat-window-style.h"
@@ -29,23 +29,19 @@
#include "adium-theme-content-info.h"
#include "adium-theme-status-info.h"
-#include <KDebug>
-#include <KDialog>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KSharedConfig>
K_PLUGIN_FACTORY(KCMTelepathyChatAppearanceConfigFactory, registerPlugin<AppearanceConfig>();)
-K_EXPORT_PLUGIN(KCMTelepathyChatAppearanceConfigFactory("ktp_chat_appearance", "kcm_ktp_chat_appearance"))
AppearanceConfig::AppearanceConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
- topLayout->setSpacing(KDialog::spacingHint());
- KTabWidget *tabWidget = new KTabWidget(this);
+ QTabWidget *tabWidget = new QTabWidget(this);
m_singleTab = new AppearanceConfigTab(this, AppearanceConfigTab::NormalChat);
tabWidget->addTab(m_singleTab, QIcon(), i18nc("@title:tab", "Normal Chat"));
@@ -78,8 +74,6 @@ void AppearanceConfig::load()
void AppearanceConfig::save()
{
- kDebug();
-
KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
m_singleTab->saveTab(config->group("Appearance"));
diff --git a/config/appearance-config.ui b/config/appearance-config.ui
index 92b78d2..2d45aa1 100644
--- a/config/appearance-config.ui
+++ b/config/appearance-config.ui
@@ -60,7 +60,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KComboBox" name="styleComboBox">
+ <widget class="QComboBox" name="styleComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -86,7 +86,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="KComboBox" name="variantComboBox">
+ <widget class="QComboBox" name="variantComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -186,7 +186,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="KFontComboBox" name="fontFamily"/>
+ <widget class="QFontComboBox" name="fontFamily"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="fontSizeLabel">
@@ -196,7 +196,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="KIntNumInput" name="fontSize"/>
+ <widget class="QSpinBox" name="fontSize"/>
</item>
</layout>
</item>
@@ -222,21 +222,6 @@
</widget>
<customwidgets>
<customwidget>
- <class>KFontComboBox</class>
- <extends>KComboBox</extends>
- <header>kfontcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KIntNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
- <customwidget>
<class>AdiumThemeView</class>
<extends>QWidget</extends>
<header>adium-theme-view.h</header>
diff --git a/config/behavior-config.cpp b/config/behavior-config.cpp
index 6bf2ccb..c02863f 100644
--- a/config/behavior-config.cpp
+++ b/config/behavior-config.cpp
@@ -19,32 +19,33 @@
***************************************************************************/
#include "behavior-config.h"
+#include <QButtonGroup>
#include "ui_behavior-config.h"
-#include <KDebug>
#include <KPluginFactory>
#include <KLocalizedString>
#include "shareprovider.h"
K_PLUGIN_FACTORY(KCMTelepathyChatBehaviorConfigFactory, registerPlugin<BehaviorConfig>();)
-K_EXPORT_PLUGIN(KCMTelepathyChatBehaviorConfigFactory("ktp_chat_behavior", "kcm_ktp_chat_behavior"))
BehaviorConfig::BehaviorConfig(QWidget *parent, const QVariantList& args)
: KCModule(parent, args),
ui(new Ui::BehaviorConfigUi())
{
- kDebug();
-
load();
ui->setupUi(this);
- ui->newTabButtonGroup->setId(ui->radioNew, TextChatConfig::NewWindow);
- ui->newTabButtonGroup->setId(ui->radioZero, TextChatConfig::FirstWindow);
+ QButtonGroup *newTabGroup = new QButtonGroup(this);
+ newTabGroup->addButton(ui->radioNew);
+ newTabGroup->addButton(ui->radioZero);
+
+ newTabGroup->setId(ui->radioNew, TextChatConfig::NewWindow);
+ newTabGroup->setId(ui->radioZero, TextChatConfig::FirstWindow);
- ui->newTabButtonGroup->button(m_openMode)->setChecked(true);
- connect(ui->newTabButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(onRadioSelected(int)));
+ newTabGroup->button(m_openMode)->setChecked(true);
+ connect(newTabGroup, SIGNAL(buttonClicked(int)), this, SLOT(onRadioSelected(int)));
ui->scrollbackLength->setSuffix(ki18ncp("Part of config 'show last [spin box] messages' This is the suffix to the spin box. Be sure to include leading space"," message", " messages"));
ui->scrollbackLength->setValue(m_scrollbackLength);
@@ -123,9 +124,7 @@ void BehaviorConfig::changeEvent(QEvent* e)
void BehaviorConfig::onRadioSelected(int id)
{
- kDebug() << "BehaviorConfig::m_openMode changed from " << id << " to " << m_openMode;
m_openMode = (TextChatConfig::TabOpenMode) id;
- kDebug() << "emitting changed(true)";
Q_EMIT changed(true);
}
@@ -158,7 +157,6 @@ void BehaviorConfig::onImageSharingServiceChanged(int index)
{
Q_UNUSED(index);
QString imageShareServiceName = ui->imageSharingService->currentText();
- kDebug() << imageShareServiceName;
m_imageShareServiceType = ShareProvider::availableShareServices()[imageShareServiceName];
Q_EMIT changed(true);
}
diff --git a/config/behavior-config.ui b/config/behavior-config.ui
index 60836a3..44c0aa6 100644
--- a/config/behavior-config.ui
+++ b/config/behavior-config.ui
@@ -12,7 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="KButtonGroup" name="newTabGroup">
+ <widget class="QGroupBox" name="newTabGroupBox">
<property name="title">
<string>Tabs</string>
</property>
@@ -45,10 +45,10 @@
</widget>
</item>
</layout>
- </widget>
+ </widget>
</item>
<item>
- <widget class="KButtonGroup" name="scrollbackGroup">
+ <widget class="QGroupBox" name="scrollbackGroupBox">
<property name="title">
<string>Last Conversation Scrollback</string>
</property>
@@ -61,7 +61,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="KIntSpinBox" name="scrollbackLength"/>
+ <widget class="KPluralHandlingSpinBox" name="scrollbackLength"/>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
@@ -80,7 +80,7 @@
</widget>
</item>
<item>
- <widget class="KButtonGroup" name="typingGroup">
+ <widget class="QGroupBox" name="typingGroupBox">
<property name="title">
<string>User Is Typing</string>
</property>
@@ -103,7 +103,7 @@
</widget>
</item>
<item>
- <widget class="KButtonGroup" name="nicknameCompletionGroup">
+ <widget class="QGroupBox" name="nicknameCompletionGroup">
<property name="title">
<string>Nickname Completion</string>
</property>
@@ -142,7 +142,7 @@
</widget>
</item>
<item>
- <widget class="KButtonGroup" name="kbuttongroup">
+ <widget class="QGroupBox" name="kbuttongroup">
<property name="title">
<string>Image Sharing</string>
</property>
@@ -228,15 +228,9 @@
</widget>
<customwidgets>
<customwidget>
- <class>KButtonGroup</class>
- <extends>QGroupBox</extends>
- <header>kbuttongroup.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>KIntSpinBox</class>
+ <class>KPluralHandlingSpinBox</class>
<extends>QSpinBox</extends>
- <header>knuminput.h</header>
+ <header>kpluralhandlingspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
diff --git a/config/messages-config.cpp b/config/messages-config.cpp
index 55fe251..0a5db38 100644
--- a/config/messages-config.cpp
+++ b/config/messages-config.cpp
@@ -24,12 +24,10 @@
#include <KPluginInfo>
#include <KPluginFactory>
#include <KPluginSelector>
-#include <KDebug>
#include <KLocalizedString>
#include <KAboutData>
K_PLUGIN_FACTORY(KTpMessagesConfigFactory, registerPlugin<MessagesConfig>();)
-K_EXPORT_PLUGIN(KTpMessagesConfigFactory("ktp_chat_messages", "kcm_ktp_chat_messages"))
MessagesConfig::MessagesConfig(QWidget* parent, const QVariantList& args)
: PluginPage(new KAboutData("ktp_chat_messages", i18n("Chat Messages"), "1.0"), parent, args)
diff --git a/config/otr-config.cpp b/config/otr-config.cpp
index 59004f8..d9922bd 100644
--- a/config/otr-config.cpp
+++ b/config/otr-config.cpp
@@ -20,24 +20,23 @@
#include "otr-config.h"
#include "ui_otr-config.h"
-#include <KTp/OTR/types.h>
-
-#include <QLatin1String>
-#include <KDebug>
#include <KPluginFactory>
#include <KLocalizedString>
+#include <KMessageBox>
+
+#include <QLatin1String>
#include <QtEvents>
#include <QDBusConnection>
#include <QAction>
#include <QMenu>
-#include <KMessageBox>
-#include <KTp/core.h>
+#include <QDebug>
+#include <KTp/OTR/types.h>
+#include <KTp/core.h>
#include <TelepathyQt/AccountSet>
#include <TelepathyQt/PendingVariant>
K_PLUGIN_FACTORY(KCMTelepathyChatOtrConfigFactory, registerPlugin<OTRConfig>();)
-K_EXPORT_PLUGIN(KCMTelepathyChatOtrConfigFactory("ktp_chat_otr", "kcm_ktp_chat_otr"))
OTRConfig::OTRConfig(QWidget *parent, const QVariantList& args)
: KCModule(parent, args),
@@ -45,8 +44,6 @@ OTRConfig::OTRConfig(QWidget *parent, const QVariantList& args)
am(KTp::accountManager()),
fpCtxMenu(new QMenu(this))
{
- kDebug();
-
ui->setupUi(this);
ui->policyGroupButtons->setId(ui->rbAlways, KTp::OTRPolicyAlways);
@@ -94,7 +91,6 @@ void OTRConfig::setProxyService(const ProxyServicePtr &proxyService)
void OTRConfig::load()
{
Q_ASSERT(!ps.isNull());
- kDebug();
accounts = am->validAccounts()->accounts();
QStringList items;
Q_FOREACH(const Tp::AccountPtr &ac, accounts) {
@@ -122,7 +118,6 @@ void OTRConfig::loadFingerprints()
}
const KTp::FingerprintInfoList fingerprints = ps->knownFingerprints(currentAccount());
- kDebug() << fingerprints.size();
ui->tbFingerprints->setRowCount(fingerprints.size());
int i = 0;
Q_FOREACH(const KTp::FingerprintInfo &fp, fingerprints) {
@@ -141,7 +136,6 @@ void OTRConfig::loadFingerprints()
void OTRConfig::save()
{
- kDebug();
connect(ps->setOTRPolicy(static_cast<uint>(policy)), SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onPolicySet(Tp::PendingOperation*)));
}
@@ -160,20 +154,17 @@ void OTRConfig::changeEvent(QEvent* e)
void OTRConfig::onRadioSelected(int id)
{
- kDebug();
policy = static_cast<KTp::OTRPolicy>(id);
Q_EMIT changed(true);
}
void OTRConfig::onGenerateClicked()
{
- kDebug();
ps->generatePrivateKey(currentAccount());
}
void OTRConfig::onAccountChosen(int id)
{
- kDebug();
const QString fp = ps->fingerprintForAccount(QDBusObjectPath(accounts.at(id)->objectPath()));
if(fp.isEmpty()) {
ui->tlFingerprint->setText(i18n("No fingerprint"));
@@ -197,7 +188,7 @@ void OTRConfig::updatePolicy()
void OTRConfig::onPolicyGet(Tp::PendingOperation *getOp)
{
if(getOp->isError()) {
- kWarning() << "Could not get OTR policy: " << getOp->errorMessage();
+ qWarning() << "Could not get OTR policy: " << getOp->errorMessage();
} else {
Tp::PendingVariant *pv = qobject_cast<Tp::PendingVariant*>(getOp);
const uint id = pv->result().toUInt(NULL);
@@ -212,7 +203,7 @@ void OTRConfig::onPolicyGet(Tp::PendingOperation *getOp)
void OTRConfig::onPolicySet(Tp::PendingOperation *setOp)
{
if(setOp->isError()) {
- kWarning() << "OTR policy set error: " << setOp->errorMessage();
+ qWarning() << "OTR policy set error: " << setOp->errorMessage();
} else {
updatePolicy();
}
@@ -249,8 +240,6 @@ void OTRConfig::onCurrentFpCellChanged(int currentRow, int currentColumn, int pr
void OTRConfig::onFpTableMenuRequested(QPoint pos)
{
- kDebug();
-
fpCtxMenu->popup(ui->tbFingerprints->viewport()->mapToGlobal(pos));
}
@@ -274,7 +263,6 @@ void OTRConfig::onVerifyClicked()
void OTRConfig::onForgetClicked()
{
- kDebug();
ps->forgetFingerprint(
currentAccount(),
ui->tbFingerprints->item(ui->tbFingerprints->currentRow(), 0)->text(),
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list