summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Klapetek <[email protected]>2015-05-26 18:38:58 +0200
committerMartin Klapetek <[email protected]>2015-05-26 18:38:58 +0200
commit3338a2cbc7868e9322cc5b92dd126edaf8909c54 (patch)
tree50e598bbacad66b4f15e3285c475ebda462de08a
parent2916a365536b2fffe9d16784b7bb67da2af58386 (diff)
Revert "Show dialogs on button clicked (not pressed)"
-rw-r--r--src/accountwidget.cpp2
-rw-r--r--src/create.cpp10
2 files changed, 4 insertions, 8 deletions
diff --git a/src/accountwidget.cpp b/src/accountwidget.cpp
index 95b4cd4..6e88bc7 100644
--- a/src/accountwidget.cpp
+++ b/src/accountwidget.cpp
@@ -101,7 +101,7 @@ void AccountWidget::setAccount(Accounts::Account *account)
QHBoxLayout *hlayout = new QHBoxLayout();
QPushButton *imConfigButton = new QPushButton(i18n("Configure..."));
- m_connections << connect(imConfigButton, &QPushButton::clicked, [=](){
+ m_connections << connect(imConfigButton, &QPushButton::pressed, [=](){
uiPlugin->init(KAccountsUiPlugin::ConfigureAccountDialog);
});
diff --git a/src/create.cpp b/src/create.cpp
index 30e7985..485f760 100644
--- a/src/create.cpp
+++ b/src/create.cpp
@@ -25,7 +25,7 @@
#include <QDebug>
#include <QWidget>
-#include <QPushButton>
+#include <QCommandLinkButton>
#include <QMessageBox>
#include <Accounts/Manager>
@@ -68,20 +68,16 @@ void Create::fillInterface()
return QString::localeAwareCompare(b.displayName(), a.displayName()) < 0;
});
- QPushButton *button;
+ QCommandLinkButton *button;
Q_FOREACH(const Accounts::Provider &provider, providerList) {
if (provider.name() == "ktp-generic") {
continue;
}
- button = new QPushButton(i18nd(provider.trCatalog().toLatin1().constData(), provider.displayName().toUtf8().constData()));
+ button = new QCommandLinkButton(i18nd(provider.trCatalog().toLatin1().constData(), provider.displayName().toUtf8().constData()));
button->setIcon(QIcon::fromTheme(provider.iconName()));
button->setProperty("providerName", provider.name());
button->setToolTip(i18nd(provider.trCatalog().toLatin1().constData(), provider.description().toUtf8().constData()));
- QFont font = button->font();
- font.setBold(true);
- button->setFont(font);
-
connect(button, SIGNAL(clicked(bool)), SLOT(createAccount()));
m_form->verticalLayout->insertWidget(0, button);
}