summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Koller <[email protected]>2015-09-30 19:47:56 +0200
committerMartin Koller <[email protected]>2015-09-30 19:47:56 +0200
commitb5c944458792db89f3760c5c884d59c3fe765fe2 (patch)
tree129be8b059447a03c3352d541cd04982d3f90684
parent38555802b34e2807d43bb129f1599f6cff9bb0e2 (diff)
Don't close the log dialog when "View" was clicked
-rw-r--r--logdialog.cpp14
-rw-r--r--logdialog.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/logdialog.cpp b/logdialog.cpp
index 4d057f8..7ad57b8 100644
--- a/logdialog.cpp
+++ b/logdialog.cpp
@@ -70,6 +70,7 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent)
setButtonGuiItem(User3, KGuiItem(i18n("&Find"), "edit-find"));
setDefaultButton(Close);
showButtonSeparator(true);
+ showButton(User3, false);
splitter = new QSplitter(Qt::Vertical, this);
setMainWidget(splitter);
@@ -207,8 +208,6 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent)
connect( this, SIGNAL(user3Clicked()),
this, SLOT(findClicked()) );
- connect(this,SIGNAL(okClicked()),
- this, SLOT(slotOk()));
connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply()));
setButtonGuiItem(Ok, KGuiItem(i18nc("to view revision A", "&View A"),"document-open"));
setButtonGuiItem(Apply, KGuiItem(i18n("Create Patch...")));
@@ -429,6 +428,17 @@ bool LogDialog::parseCvsLog(OrgKdeCervisiaCvsserviceCvsserviceInterface* service
return true; // successful
}
+void LogDialog::slotButtonClicked(int button)
+{
+ if ( button == KDialog::Ok )
+ {
+ // ok button (used for "view") shall not close the dialog
+ slotOk();
+ return;
+ }
+
+ KDialog::slotButtonClicked(button);
+}
void LogDialog::slotOk()
{
diff --git a/logdialog.h b/logdialog.h
index 9c97a47..8ffc8ec 100644
--- a/logdialog.h
+++ b/logdialog.h
@@ -59,6 +59,7 @@ public:
bool parseCvsLog(OrgKdeCervisiaCvsserviceCvsserviceInterface* service, const QString& fileName);
protected slots:
+ virtual void slotButtonClicked(int button);
void slotOk();
void slotApply();