[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kio] src/widgets: Removed duplicate clear button
From:       Christoph Feck <cfeck () kde ! org>
Date:       2016-10-31 20:57:36
Message-ID: E1c1JeC-00006y-AT () code ! kde ! org
[Download RAW message or body]

Git commit a2aef4c9b3d43ffc45019f6cccb40721e0594aae by Christoph Feck, on \
behalf of Aniketh Girish. Committed on 31/10/2016 at 20:56.
Pushed by cfeck into branch 'master'.

Removed duplicate clear button

BUG: 369377
REVIEW: 129294

M  +0    -13   src/widgets/kurlrequesterdialog.cpp
M  +0    -1    src/widgets/kurlrequesterdialog.h

http://commits.kde.org/kio/a2aef4c9b3d43ffc45019f6cccb40721e0594aae

diff --git a/src/widgets/kurlrequesterdialog.cpp \
b/src/widgets/kurlrequesterdialog.cpp index 4c2f526..1fbbd96 100644
--- a/src/widgets/kurlrequesterdialog.cpp
+++ b/src/widgets/kurlrequesterdialog.cpp
@@ -43,12 +43,10 @@ public:
     void initDialog(const QString &text, const QUrl &url);
 
     // slots
-    void _k_slotClear();
     void _k_slotTextChanged(const QString &);
 
     KUrlRequester *urlRequester;
     QDialogButtonBox *buttonBox;
-    QPushButton *clearButton;
 };
 
 KUrlRequesterDialog::KUrlRequesterDialog(const QUrl &urlName, QWidget \
*parent) @@ -88,12 +86,7 @@ void \
KUrlRequesterDialogPrivate::initDialog(const QString &text, const QUrl &url \
                urlRequester_->setMode( mode );
     */
 
-    clearButton = new QPushButton;
-    KGuiItem::assign(clearButton, KStandardGuiItem::clear());
-    QObject::connect(clearButton, SIGNAL(clicked()), q, \
                SLOT(_k_slotClear()));
-
     buttonBox = new QDialogButtonBox(q);
-    buttonBox->addButton(clearButton, QDialogButtonBox::ActionRole);
     buttonBox->setStandardButtons(QDialogButtonBox::Ok | \
QDialogButtonBox::Cancel);  QObject::connect(buttonBox, SIGNAL(accepted()), \
q, SLOT(accept()));  QObject::connect(buttonBox, SIGNAL(rejected()), q, \
SLOT(reject())); @@ -106,12 +99,6 @@ void \
KUrlRequesterDialogPrivate::_k_slotTextChanged(const QString &text)  {
     bool state = !text.trimmed().isEmpty();
     buttonBox->button(QDialogButtonBox::Ok)->setEnabled(state);
-    clearButton->setEnabled(state);
-}
-
-void KUrlRequesterDialogPrivate::_k_slotClear()
-{
-    urlRequester->clear();
 }
 
 QUrl KUrlRequesterDialog::selectedUrl() const
diff --git a/src/widgets/kurlrequesterdialog.h \
b/src/widgets/kurlrequesterdialog.h index ea25333..fd5d002 100644
--- a/src/widgets/kurlrequesterdialog.h
+++ b/src/widgets/kurlrequesterdialog.h
@@ -100,7 +100,6 @@ private:
 
     Q_DISABLE_COPY(KUrlRequesterDialog)
 
-    Q_PRIVATE_SLOT(d, void _k_slotClear())
     Q_PRIVATE_SLOT(d, void _k_slotTextChanged(const QString &))
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic