From 9f3c7cf1ea1851cd77bd07b369a602a9608c265d Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 17 Feb 2008 20:16:14 +0000 Subject: [PATCH] Factorize closeEvent() for GuiDialog based dialogs. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23045 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiBibitem.cpp | 8 -------- src/frontends/qt4/GuiBibitem.h | 4 ---- src/frontends/qt4/GuiBibtex.cpp | 7 ------- src/frontends/qt4/GuiBibtex.h | 3 --- src/frontends/qt4/GuiBox.cpp | 7 ------- src/frontends/qt4/GuiBox.h | 3 --- src/frontends/qt4/GuiBranch.cpp | 7 ------- src/frontends/qt4/GuiBranch.h | 2 -- src/frontends/qt4/GuiChanges.cpp | 7 ------- src/frontends/qt4/GuiChanges.h | 2 +- src/frontends/qt4/GuiCharacter.cpp | 7 ------- src/frontends/qt4/GuiCharacter.h | 1 - src/frontends/qt4/GuiCitation.cpp | 2 +- src/frontends/qt4/GuiDialog.cpp | 7 +++++++ src/frontends/qt4/GuiDialog.h | 2 ++ src/frontends/qt4/GuiDocument.cpp | 7 ------- src/frontends/qt4/GuiDocument.h | 3 --- src/frontends/qt4/GuiERT.cpp | 7 ------- src/frontends/qt4/GuiERT.h | 1 - src/frontends/qt4/GuiErrorList.cpp | 7 ------- src/frontends/qt4/GuiErrorList.h | 2 -- src/frontends/qt4/GuiExternal.cpp | 7 ------- src/frontends/qt4/GuiExternal.h | 3 +-- src/frontends/qt4/GuiFloat.cpp | 7 ------- src/frontends/qt4/GuiFloat.h | 1 - src/frontends/qt4/GuiGraphics.cpp | 7 ------- src/frontends/qt4/GuiGraphics.h | 2 +- src/frontends/qt4/GuiHyperlink.cpp | 7 ------- src/frontends/qt4/GuiHyperlink.h | 1 - src/frontends/qt4/GuiInclude.cpp | 7 ------- src/frontends/qt4/GuiInclude.h | 2 -- src/frontends/qt4/GuiListings.cpp | 7 ------- src/frontends/qt4/GuiListings.h | 1 - src/frontends/qt4/GuiLog.cpp | 7 ------- src/frontends/qt4/GuiLog.h | 1 - src/frontends/qt4/GuiNomencl.cpp | 7 ------- src/frontends/qt4/GuiNomencl.h | 2 -- src/frontends/qt4/GuiNote.cpp | 7 ------- src/frontends/qt4/GuiNote.h | 1 - src/frontends/qt4/GuiPrefs.cpp | 7 ------- src/frontends/qt4/GuiPrefs.h | 2 -- src/frontends/qt4/GuiRef.cpp | 2 +- src/frontends/qt4/GuiSearch.cpp | 7 ------- src/frontends/qt4/GuiSearch.h | 1 - src/frontends/qt4/GuiSendto.cpp | 7 ------- src/frontends/qt4/GuiSendto.h | 1 - src/frontends/qt4/GuiShowFile.cpp | 7 ------- src/frontends/qt4/GuiShowFile.h | 2 -- src/frontends/qt4/GuiSpellchecker.cpp | 7 ------- src/frontends/qt4/GuiSpellchecker.h | 2 -- src/frontends/qt4/GuiTabular.cpp | 7 ------- src/frontends/qt4/GuiTabular.h | 2 -- src/frontends/qt4/GuiTexinfo.cpp | 7 ------- src/frontends/qt4/GuiTexinfo.h | 2 -- src/frontends/qt4/GuiThesaurus.cpp | 7 ------- src/frontends/qt4/GuiThesaurus.h | 1 - src/frontends/qt4/GuiVSpace.cpp | 7 ------- src/frontends/qt4/GuiVSpace.h | 2 -- src/frontends/qt4/GuiWrap.cpp | 7 ------- src/frontends/qt4/GuiWrap.h | 1 - 60 files changed, 14 insertions(+), 247 deletions(-) diff --git a/src/frontends/qt4/GuiBibitem.cpp b/src/frontends/qt4/GuiBibitem.cpp index 3f9cab6923..0e13e49426 100644 --- a/src/frontends/qt4/GuiBibitem.cpp +++ b/src/frontends/qt4/GuiBibitem.cpp @@ -14,7 +14,6 @@ #include "qt_helpers.h" #include "FuncRequest.h" -#include #include #include @@ -50,13 +49,6 @@ void GuiBibitem::change_adaptor() } -void GuiBibitem::closeEvent(QCloseEvent *e) -{ - slotClose(); - e->accept(); -} - - void GuiBibitem::updateContents() { keyED->setText(toqstr(params_["key"])); diff --git a/src/frontends/qt4/GuiBibitem.h b/src/frontends/qt4/GuiBibitem.h index dfc18a1d1b..8d7ea4faa6 100644 --- a/src/frontends/qt4/GuiBibitem.h +++ b/src/frontends/qt4/GuiBibitem.h @@ -31,10 +31,6 @@ public: private Q_SLOTS: void change_adaptor(); -private: - /// - void closeEvent(QCloseEvent * e); - private: /// bool isValid(); diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index 8d1cac783b..8487f6bf1c 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -278,13 +278,6 @@ void GuiBibtex::availableChanged() } -void GuiBibtex::closeEvent(QCloseEvent *e) -{ - slotClose(); - e->accept(); -} - - void GuiBibtex::updateContents() { bool bibtopic = usingBibtopic(); diff --git a/src/frontends/qt4/GuiBibtex.h b/src/frontends/qt4/GuiBibtex.h index c2df10317b..9bac17bc45 100644 --- a/src/frontends/qt4/GuiBibtex.h +++ b/src/frontends/qt4/GuiBibtex.h @@ -59,9 +59,6 @@ private Q_SLOTS: void availableChanged(); void bibEDChanged(); -private: - void closeEvent(QCloseEvent * e); - private: /// bool isValid(); diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index 9bd62817df..849a235a5b 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -144,13 +144,6 @@ GuiBox::GuiBox(GuiView & lv) } -void GuiBox::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiBox::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiBox.h b/src/frontends/qt4/GuiBox.h index 230d46439a..a6b0931936 100644 --- a/src/frontends/qt4/GuiBox.h +++ b/src/frontends/qt4/GuiBox.h @@ -38,9 +38,6 @@ private Q_SLOTS: void pagebreakClicked(); private: - /// - void closeEvent(QCloseEvent * e); - /// add and remove special lengths void setSpecial(bool ibox); /// only show valid inner box items diff --git a/src/frontends/qt4/GuiBranch.cpp b/src/frontends/qt4/GuiBranch.cpp index 4c09892c0a..95c52ac014 100644 --- a/src/frontends/qt4/GuiBranch.cpp +++ b/src/frontends/qt4/GuiBranch.cpp @@ -47,13 +47,6 @@ GuiBranch::GuiBranch(GuiView & lv) } -void GuiBranch::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiBranch::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiBranch.h b/src/frontends/qt4/GuiBranch.h index e33e151a73..fd2f371df8 100644 --- a/src/frontends/qt4/GuiBranch.h +++ b/src/frontends/qt4/GuiBranch.h @@ -33,8 +33,6 @@ private Q_SLOTS: void change_adaptor(); private: - /// - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// Update dialog before showing it diff --git a/src/frontends/qt4/GuiChanges.cpp b/src/frontends/qt4/GuiChanges.cpp index 63b3533885..f4a700089b 100644 --- a/src/frontends/qt4/GuiChanges.cpp +++ b/src/frontends/qt4/GuiChanges.cpp @@ -54,13 +54,6 @@ GuiChanges::GuiChanges(GuiView & lv) } -void GuiChanges::closeEvent(QCloseEvent *e) -{ - slotClose(); - e->accept(); -} - - void GuiChanges::updateContents() { docstring text; diff --git a/src/frontends/qt4/GuiChanges.h b/src/frontends/qt4/GuiChanges.h index a1579a5ee8..2579145ba1 100644 --- a/src/frontends/qt4/GuiChanges.h +++ b/src/frontends/qt4/GuiChanges.h @@ -37,7 +37,7 @@ protected Q_SLOTS: void nextChange(); private: - void closeEvent(QCloseEvent * e); + /// void updateContents(); /// Nothing to initialise in this case. diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index 14bb54f136..94ef29957b 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -377,13 +377,6 @@ void GuiCharacter::change_adaptor() } -void GuiCharacter::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - template static int findPos2nd(vector > const & vec, B const & val) { diff --git a/src/frontends/qt4/GuiCharacter.h b/src/frontends/qt4/GuiCharacter.h index faf9716f4c..bf5d92fb90 100644 --- a/src/frontends/qt4/GuiCharacter.h +++ b/src/frontends/qt4/GuiCharacter.h @@ -57,7 +57,6 @@ protected Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// update diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 5b668f0b34..1135d54aa4 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -119,7 +119,7 @@ void GuiCitation::closeEvent(QCloseEvent * e) { clearSelection(); clearParams(); - GuiDialog::closeEvent(e); + e->accept(); } diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp index 5670894143..67b250374f 100644 --- a/src/frontends/qt4/GuiDialog.cpp +++ b/src/frontends/qt4/GuiDialog.cpp @@ -31,6 +31,13 @@ GuiDialog::GuiDialog(GuiView & lv, string const & name, QString const & title) {} +void GuiDialog::closeEvent(QCloseEvent *e) +{ + slotClose(); + e->accept(); +} + + void GuiDialog::setButtonsValid(bool valid) { bc().setValid(valid); diff --git a/src/frontends/qt4/GuiDialog.h b/src/frontends/qt4/GuiDialog.h index 7ade39cd6e..9f91385e30 100644 --- a/src/frontends/qt4/GuiDialog.h +++ b/src/frontends/qt4/GuiDialog.h @@ -58,6 +58,8 @@ public Q_SLOTS: void slotApply(); // Close button clicked or closed from WindowManager void slotClose(); + /// + void closeEvent(QCloseEvent * e); public: /** Check whether we may apply our data. diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 6f020c3acd..1fa4f93050 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1034,13 +1034,6 @@ void GuiDocument::set_listings_msg() } -void GuiDocument::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiDocument::setLSpacing(int item) { textLayoutModule->lspacingLE->setEnabled(item == 3); diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index b379687ec0..5f4d6ef251 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -141,9 +141,6 @@ private Q_SLOTS: void classChanged(); void updateModuleInfo(); void updateEmbeddedFileList(); - -private: - void closeEvent(QCloseEvent * e); private: UiWidget *textLayoutModule; diff --git a/src/frontends/qt4/GuiERT.cpp b/src/frontends/qt4/GuiERT.cpp index 289e809d8f..e91fc294ba 100644 --- a/src/frontends/qt4/GuiERT.cpp +++ b/src/frontends/qt4/GuiERT.cpp @@ -41,13 +41,6 @@ GuiERT::GuiERT(GuiView & lv) } -void GuiERT::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiERT::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiERT.h b/src/frontends/qt4/GuiERT.h index aad5f12464..09debfeb18 100644 --- a/src/frontends/qt4/GuiERT.h +++ b/src/frontends/qt4/GuiERT.h @@ -30,7 +30,6 @@ private Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// update diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 4e3ab938dd..007e30fcfd 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -49,13 +49,6 @@ GuiErrorList::GuiErrorList(GuiView & lv) } -void GuiErrorList::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiErrorList::showEvent(QShowEvent * e) { errorsLW->setCurrentRow(0); diff --git a/src/frontends/qt4/GuiErrorList.h b/src/frontends/qt4/GuiErrorList.h index cddea246aa..4472dc5a85 100644 --- a/src/frontends/qt4/GuiErrorList.h +++ b/src/frontends/qt4/GuiErrorList.h @@ -33,8 +33,6 @@ public Q_SLOTS: void select(QListWidgetItem *); private: - /// - void closeEvent(QCloseEvent *); /// void showEvent(QShowEvent *); /// update contents diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index b4bfd30e00..eb025be449 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -271,13 +271,6 @@ void GuiExternal::change_adaptor() } -void GuiExternal::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiExternal::editClicked() { editExternal(); diff --git a/src/frontends/qt4/GuiExternal.h b/src/frontends/qt4/GuiExternal.h index 36eec3ae58..dd591e3f14 100644 --- a/src/frontends/qt4/GuiExternal.h +++ b/src/frontends/qt4/GuiExternal.h @@ -60,8 +60,7 @@ public: typedef std::map MapType; private: - void closeEvent(QCloseEvent * e); - // + /// bool activateAspectratio() const; /// Apply changes void applyView(); diff --git a/src/frontends/qt4/GuiFloat.cpp b/src/frontends/qt4/GuiFloat.cpp index 14657a73f4..03c059b843 100644 --- a/src/frontends/qt4/GuiFloat.cpp +++ b/src/frontends/qt4/GuiFloat.cpp @@ -59,13 +59,6 @@ void GuiFloat::change_adaptor() } -void GuiFloat::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiFloat::updateContents() { floatFP->set(params_); diff --git a/src/frontends/qt4/GuiFloat.h b/src/frontends/qt4/GuiFloat.h index fe820f2d86..76a73b834d 100644 --- a/src/frontends/qt4/GuiFloat.h +++ b/src/frontends/qt4/GuiFloat.h @@ -31,7 +31,6 @@ private Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// update diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 4fa354d9dd..7194868b65 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -268,13 +268,6 @@ void GuiGraphics::change_bb() } -void GuiGraphics::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - void GuiGraphics::on_browsePB_clicked() { docstring const str = browse(qstring_to_ucs4(filename->text())); diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index a80074e70b..b544c5308c 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -53,7 +53,7 @@ private Q_SLOTS: void on_angle_textChanged(const QString &); private: - void closeEvent(QCloseEvent * e); + /// bool isValid(); /// Apply changes void applyView(); diff --git a/src/frontends/qt4/GuiHyperlink.cpp b/src/frontends/qt4/GuiHyperlink.cpp index ee3cb2e9a6..063bce724e 100644 --- a/src/frontends/qt4/GuiHyperlink.cpp +++ b/src/frontends/qt4/GuiHyperlink.cpp @@ -62,13 +62,6 @@ void GuiHyperlink::changed_adaptor() } -void GuiHyperlink::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiHyperlink::updateContents() { targetED->setText(toqstr(params_["target"])); diff --git a/src/frontends/qt4/GuiHyperlink.h b/src/frontends/qt4/GuiHyperlink.h index 24d709fb4b..dd8329d78a 100644 --- a/src/frontends/qt4/GuiHyperlink.h +++ b/src/frontends/qt4/GuiHyperlink.h @@ -31,7 +31,6 @@ public Q_SLOTS: void changed_adaptor(); private: - void closeEvent(QCloseEvent *); /// bool isValid(); /// apply dialog diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index 190af32ad3..fcd8ede71c 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -127,13 +127,6 @@ void GuiInclude::set_listings_msg() } -void GuiInclude::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiInclude::typeChanged(int v) { switch (v) { diff --git a/src/frontends/qt4/GuiInclude.h b/src/frontends/qt4/GuiInclude.h index 91383900ed..df33c26ee2 100644 --- a/src/frontends/qt4/GuiInclude.h +++ b/src/frontends/qt4/GuiInclude.h @@ -60,8 +60,6 @@ private: LISTINGS, }; /// - void closeEvent(QCloseEvent * e); - /// void updateLists(); /// validate listings parameters and return an error message, if any docstring validate_listings_params(); diff --git a/src/frontends/qt4/GuiListings.cpp b/src/frontends/qt4/GuiListings.cpp index 08974c54f2..d6894d0f62 100644 --- a/src/frontends/qt4/GuiListings.cpp +++ b/src/frontends/qt4/GuiListings.cpp @@ -238,13 +238,6 @@ GuiListings::GuiListings(GuiView & lv) } -void GuiListings::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiListings::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiListings.h b/src/frontends/qt4/GuiListings.h index 653fbcd760..2254199768 100644 --- a/src/frontends/qt4/GuiListings.h +++ b/src/frontends/qt4/GuiListings.h @@ -44,7 +44,6 @@ private Q_SLOTS: /// show dialect when language is chosen void on_languageCO_currentIndexChanged(int); private: - void closeEvent(QCloseEvent * e); /// return false if validate_listings_params returns error bool isValid(); /// Apply changes diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index 4d748916fc..9cc479d614 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -120,13 +120,6 @@ GuiLog::GuiLog(GuiView & lv) } -void GuiLog::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiLog::updateContents() { setTitle(toqstr(title())); diff --git a/src/frontends/qt4/GuiLog.h b/src/frontends/qt4/GuiLog.h index 3e4de5abbb..f7829c73f9 100644 --- a/src/frontends/qt4/GuiLog.h +++ b/src/frontends/qt4/GuiLog.h @@ -37,7 +37,6 @@ private Q_SLOTS: void on_copyPB_clicked(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView() {} diff --git a/src/frontends/qt4/GuiNomencl.cpp b/src/frontends/qt4/GuiNomencl.cpp index 4516e5450a..cd6a04326b 100644 --- a/src/frontends/qt4/GuiNomencl.cpp +++ b/src/frontends/qt4/GuiNomencl.cpp @@ -63,13 +63,6 @@ void GuiNomenclature::reject() } -void GuiNomenclature::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiNomenclature::updateContents() { prefixED->setText(toqstr(params_["prefix"])); diff --git a/src/frontends/qt4/GuiNomencl.h b/src/frontends/qt4/GuiNomencl.h index c9fa2cb825..f5c3ac6af1 100644 --- a/src/frontends/qt4/GuiNomencl.h +++ b/src/frontends/qt4/GuiNomencl.h @@ -32,8 +32,6 @@ private Q_SLOTS: void reject(); private: - /// - void closeEvent(QCloseEvent * e); /// bool isValid(); /// Apply changes diff --git a/src/frontends/qt4/GuiNote.cpp b/src/frontends/qt4/GuiNote.cpp index 6c3eff5fc6..f21dfb7fc3 100644 --- a/src/frontends/qt4/GuiNote.cpp +++ b/src/frontends/qt4/GuiNote.cpp @@ -42,13 +42,6 @@ GuiNote::GuiNote(GuiView & lv) } -void GuiNote::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiNote::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiNote.h b/src/frontends/qt4/GuiNote.h index 25525e3a6c..21fb2a87a6 100644 --- a/src/frontends/qt4/GuiNote.h +++ b/src/frontends/qt4/GuiNote.h @@ -27,7 +27,6 @@ public: private Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// Update dialog before showing it diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 6946811992..cce2399110 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -2211,13 +2211,6 @@ void GuiPreferences::add(PrefModule * module) } -void GuiPreferences::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiPreferences::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index 50202e5dd2..ec37c76a60 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -436,8 +436,6 @@ public Q_SLOTS: void change_adaptor(); public: - // - void closeEvent(QCloseEvent * e); /// void add(PrefModule * module); /// Apply changes diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index df032c00a3..759b668d01 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -180,7 +180,7 @@ void GuiRef::closeEvent(QCloseEvent * e) { slotClose(); reset_dialog(); - GuiDialog::closeEvent(e); + e->accept(); } diff --git a/src/frontends/qt4/GuiSearch.cpp b/src/frontends/qt4/GuiSearch.cpp index b6c7cc7400..7cfe5af647 100644 --- a/src/frontends/qt4/GuiSearch.cpp +++ b/src/frontends/qt4/GuiSearch.cpp @@ -70,13 +70,6 @@ void GuiSearch::showEvent(QShowEvent * e) } -void GuiSearch::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - void GuiSearch::findChanged() { if (findCO->currentText().isEmpty()) { diff --git a/src/frontends/qt4/GuiSearch.h b/src/frontends/qt4/GuiSearch.h index 85ea64843e..b565553074 100644 --- a/src/frontends/qt4/GuiSearch.h +++ b/src/frontends/qt4/GuiSearch.h @@ -34,7 +34,6 @@ private Q_SLOTS: private: void showEvent(QShowEvent * e); - void closeEvent(QCloseEvent * e); /// bool initialiseParams(std::string const &) { return true; } void clearParams() {} diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index 891d2b9721..0afd45723d 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -65,13 +65,6 @@ void GuiSendTo::changed_adaptor() } -void GuiSendTo::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiSendTo::updateContents() { all_formats_ = allFormats(); diff --git a/src/frontends/qt4/GuiSendto.h b/src/frontends/qt4/GuiSendto.h index 595f5b815a..99afaf5f71 100644 --- a/src/frontends/qt4/GuiSendto.h +++ b/src/frontends/qt4/GuiSendto.h @@ -39,7 +39,6 @@ private Q_SLOTS: void slotFormatSelected(QListWidgetItem *) {} private: - void closeEvent(QCloseEvent * e); /// bool isValid(); /// Apply from dialog diff --git a/src/frontends/qt4/GuiShowFile.cpp b/src/frontends/qt4/GuiShowFile.cpp index 95db41b06b..58ea26e42f 100644 --- a/src/frontends/qt4/GuiShowFile.cpp +++ b/src/frontends/qt4/GuiShowFile.cpp @@ -39,13 +39,6 @@ GuiShowFile::GuiShowFile(GuiView & lv) } -void GuiShowFile::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiShowFile::updateContents() { setWindowTitle(toqstr(onlyFilename(filename_.absFilename()))); diff --git a/src/frontends/qt4/GuiShowFile.h b/src/frontends/qt4/GuiShowFile.h index b8dad883b1..db82eae87e 100644 --- a/src/frontends/qt4/GuiShowFile.h +++ b/src/frontends/qt4/GuiShowFile.h @@ -29,8 +29,6 @@ public: GuiShowFile(GuiView & lv); private: - /// - void closeEvent(QCloseEvent * e); /// update void updateContents(); /// diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 9c4ad163cc..b147f7419b 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -110,13 +110,6 @@ void GuiSpellchecker::replaceChanged(const QString & str) } -void GuiSpellchecker::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - void GuiSpellchecker::reject() { slotClose(); diff --git a/src/frontends/qt4/GuiSpellchecker.h b/src/frontends/qt4/GuiSpellchecker.h index b0e6862f19..19186ee211 100644 --- a/src/frontends/qt4/GuiSpellchecker.h +++ b/src/frontends/qt4/GuiSpellchecker.h @@ -47,8 +47,6 @@ private Q_SLOTS: void reject(); private: - /// - void closeEvent(QCloseEvent * e); /// update from controller void partialUpdate(int id); /// diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 9fff9843bc..982a8a3b2c 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -161,13 +161,6 @@ void GuiTabular::change_adaptor() } -void GuiTabular::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - void GuiTabular::booktabsChanged(bool) { changed(); diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index e7ab37149b..b33e84933f 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -69,8 +69,6 @@ private Q_SLOTS: void ltLastFooterEmpty_clicked(); private: - /// - void closeEvent(QCloseEvent * e); /// bool isValid() { return true; } /// update borders diff --git a/src/frontends/qt4/GuiTexinfo.cpp b/src/frontends/qt4/GuiTexinfo.cpp index 4c3d48bb2d..c83aab1e9f 100644 --- a/src/frontends/qt4/GuiTexinfo.cpp +++ b/src/frontends/qt4/GuiTexinfo.cpp @@ -113,13 +113,6 @@ void GuiTexInfo::change_adaptor() } -void GuiTexInfo::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiTexInfo::rescanClicked() { // build new *Files.lst diff --git a/src/frontends/qt4/GuiTexinfo.h b/src/frontends/qt4/GuiTexinfo.h index 8231f1c210..f734fc6e66 100644 --- a/src/frontends/qt4/GuiTexinfo.h +++ b/src/frontends/qt4/GuiTexinfo.h @@ -49,8 +49,6 @@ private Q_SLOTS: void enableViewPB(); private: - /// - void closeEvent(QCloseEvent * e); /// void updateStyles(TexFileType); /// diff --git a/src/frontends/qt4/GuiThesaurus.cpp b/src/frontends/qt4/GuiThesaurus.cpp index 782a071054..5bd2d9a44b 100644 --- a/src/frontends/qt4/GuiThesaurus.cpp +++ b/src/frontends/qt4/GuiThesaurus.cpp @@ -72,13 +72,6 @@ void GuiThesaurus::change_adaptor() } -void GuiThesaurus::closeEvent(QCloseEvent * e) -{ - slotClose(); - GuiDialog::closeEvent(e); -} - - void GuiThesaurus::entryChanged() { updateLists(); diff --git a/src/frontends/qt4/GuiThesaurus.h b/src/frontends/qt4/GuiThesaurus.h index e5671fba36..2d0034bbdf 100644 --- a/src/frontends/qt4/GuiThesaurus.h +++ b/src/frontends/qt4/GuiThesaurus.h @@ -37,7 +37,6 @@ private Q_SLOTS: void itemClicked(QTreeWidgetItem *, int); private: - void closeEvent(QCloseEvent * e); /// update void updateContents(); /// diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index 8a7442a0c7..2f8a1013c0 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -82,13 +82,6 @@ GuiVSpace::GuiVSpace(GuiView & lv) } -void GuiVSpace::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiVSpace::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiVSpace.h b/src/frontends/qt4/GuiVSpace.h index b46eecd01d..1c28ff2c2b 100644 --- a/src/frontends/qt4/GuiVSpace.h +++ b/src/frontends/qt4/GuiVSpace.h @@ -33,8 +33,6 @@ private Q_SLOTS: /// void change_adaptor(); /// - void closeEvent(QCloseEvent *); - /// void enableCustom(int); private: diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index 95be49f141..14bf05c06e 100644 --- a/src/frontends/qt4/GuiWrap.cpp +++ b/src/frontends/qt4/GuiWrap.cpp @@ -84,13 +84,6 @@ GuiWrap::GuiWrap(GuiView & lv) } -void GuiWrap::closeEvent(QCloseEvent * e) -{ - slotClose(); - e->accept(); -} - - void GuiWrap::change_adaptor() { changed(); diff --git a/src/frontends/qt4/GuiWrap.h b/src/frontends/qt4/GuiWrap.h index e483400eab..dbb20edb6b 100644 --- a/src/frontends/qt4/GuiWrap.h +++ b/src/frontends/qt4/GuiWrap.h @@ -30,7 +30,6 @@ private Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); /// Apply changes void applyView(); /// update -- 2.39.2