commit dc5d056dd51a289483d996d5b21c55274044822d
Author: Guillaume Munch <[email protected]>
Date: Wed Nov 9 23:37:35 2016 +0100
Fix warning during runtime with qt4
Do not use "on_" as a prefix for functions unless the use of auto-connect is
intended.
---
src/frontends/qt4/Dialog.h | 2 +-
src/frontends/qt4/DialogView.cpp | 2 +-
src/frontends/qt4/DialogView.h | 2 +-
src/frontends/qt4/DockView.cpp | 2 +-
src/frontends/qt4/DockView.h | 2 +-
src/frontends/qt4/GuiDialog.cpp | 2 +-
src/frontends/qt4/GuiDialog.h | 2 +-
src/frontends/qt4/GuiDocument.cpp | 2 +-
src/frontends/qt4/GuiDocument.h | 2 +-
src/frontends/qt4/GuiView.cpp | 4 ++--
src/frontends/qt4/GuiView.h | 2 +-
src/frontends/qt4/GuiViewSource.cpp | 2 +-
src/frontends/qt4/GuiViewSource.h | 2 +-
13 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/frontends/qt4/Dialog.h b/src/frontends/qt4/Dialog.h
index bf4a313..6858715 100644
--- a/src/frontends/qt4/Dialog.h
+++ b/src/frontends/qt4/Dialog.h
@@ -265,7 +265,7 @@ protected:
///
virtual void apply();
/// To be called when the buffer view has changed
- virtual void on_bufferViewChanged() = 0;
+ virtual void onBufferViewChanged() = 0;
private:
/** The Dialog's name is the means by which a dialog identifies
diff --git a/src/frontends/qt4/DialogView.cpp b/src/frontends/qt4/DialogView.cpp
index 7b9ee9c..9b114ec 100644
--- a/src/frontends/qt4/DialogView.cpp
+++ b/src/frontends/qt4/DialogView.cpp
@@ -21,7 +21,7 @@ DialogView::DialogView(GuiView & lv, QString const & name,
QString const & title
: QDialog(&lv), Dialog(lv, name, "LyX: " + title)
{
connect(&lv, SIGNAL(bufferViewChanged()),
- this, SLOT(on_bufferViewChanged()));
+ this, SLOT(onBufferViewChanged()));
// remove question marks from Windows dialogs
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
diff --git a/src/frontends/qt4/DialogView.h b/src/frontends/qt4/DialogView.h
index 180bcb1..aa00f64 100644
--- a/src/frontends/qt4/DialogView.h
+++ b/src/frontends/qt4/DialogView.h
@@ -49,7 +49,7 @@ protected:
void hideEvent(QHideEvent * ev);
protected Q_SLOTS:
- void on_bufferViewChanged() {};
+ void onBufferViewChanged() {};
};
} // namespace frontend
diff --git a/src/frontends/qt4/DockView.cpp b/src/frontends/qt4/DockView.cpp
index ea385ee..c1b459b 100644
--- a/src/frontends/qt4/DockView.cpp
+++ b/src/frontends/qt4/DockView.cpp
@@ -27,7 +27,7 @@ DockView::DockView(GuiView & parent, QString const & name,
parent.addDockWidget(area, this);
hide();
connect(&parent, SIGNAL(bufferViewChanged()),
- this, SLOT(on_bufferViewChanged()));
+ this, SLOT(onBufferViewChanged()));
}
diff --git a/src/frontends/qt4/DockView.h b/src/frontends/qt4/DockView.h
index 3c5f764..621368b 100644
--- a/src/frontends/qt4/DockView.h
+++ b/src/frontends/qt4/DockView.h
@@ -58,7 +58,7 @@ public:
//@}
protected Q_SLOTS:
- void on_bufferViewChanged() {} //override
+ void onBufferViewChanged() {} //override
};
} // frontend
diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp
index 91ee667..cad37e6 100644
--- a/src/frontends/qt4/GuiDialog.cpp
+++ b/src/frontends/qt4/GuiDialog.cpp
@@ -29,7 +29,7 @@ GuiDialog::GuiDialog(GuiView & lv, QString const & name,
QString const & title)
is_closing_(false)
{
connect(&lv, SIGNAL(bufferViewChanged()),
- this, SLOT(on_bufferViewChanged()));
+ this, SLOT(onBufferViewChanged()));
// remove question marks from Windows dialogs
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
diff --git a/src/frontends/qt4/GuiDialog.h b/src/frontends/qt4/GuiDialog.h
index 20ffde0..3b26943 100644
--- a/src/frontends/qt4/GuiDialog.h
+++ b/src/frontends/qt4/GuiDialog.h
@@ -60,7 +60,7 @@ public Q_SLOTS:
void closeEvent(QCloseEvent * e);
protected Q_SLOTS:
- void on_bufferViewChanged() {};//override
+ void onBufferViewChanged() {};//override
public:
/** Check whether we may apply our data.
diff --git a/src/frontends/qt4/GuiDocument.cpp
b/src/frontends/qt4/GuiDocument.cpp
index 2a40873..a69a111 100644
--- a/src/frontends/qt4/GuiDocument.cpp
+++ b/src/frontends/qt4/GuiDocument.cpp
@@ -1457,7 +1457,7 @@ GuiDocument::GuiDocument(GuiView & lv)
}
-void GuiDocument::on_bufferViewChanged()
+void GuiDocument::onBufferViewChanged()
{
if (isVisibleView())
initialiseParams("");
diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h
index c2f944d..c055378 100644
--- a/src/frontends/qt4/GuiDocument.h
+++ b/src/frontends/qt4/GuiDocument.h
@@ -83,7 +83,7 @@ public:
BufferParams const & params() const { return bp_; }
public Q_SLOTS:
- void on_bufferViewChanged();//override
+ void onBufferViewChanged();//override
private Q_SLOTS:
void updateNumbering();
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index a714960..70aa588 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -513,7 +513,7 @@ GuiView::GuiView(int id)
command_execute_(false), minibuffer_focus_(false)
{
connect(this, SIGNAL(bufferViewChanged()),
- this, SLOT(on_bufferViewChanged()));
+ this, SLOT(onBufferViewChanged()));
// GuiToolbars *must* be initialised before the menu bar.
normalSizedIcons(); // at least on Mac the default is 32 otherwise,
which is huge
@@ -1210,7 +1210,7 @@ void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
}
-void GuiView::on_bufferViewChanged()
+void GuiView::onBufferViewChanged()
{
structureChanged();
// Buffer-dependent dialogs must be updated. This is done here because
diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h
index 4beeb0e..4bc8b18 100644
--- a/src/frontends/qt4/GuiView.h
+++ b/src/frontends/qt4/GuiView.h
@@ -233,7 +233,7 @@ private Q_SLOTS:
///
void on_currentWorkAreaChanged(GuiWorkArea *);
///
- void on_bufferViewChanged();
+ void onBufferViewChanged();
///
void on_lastWorkAreaRemoved();
diff --git a/src/frontends/qt4/GuiViewSource.cpp
b/src/frontends/qt4/GuiViewSource.cpp
index b413b9c..9c0ea1d 100644
--- a/src/frontends/qt4/GuiViewSource.cpp
+++ b/src/frontends/qt4/GuiViewSource.cpp
@@ -423,7 +423,7 @@ GuiViewSource::GuiViewSource(GuiView & parent,
}
-void GuiViewSource::on_bufferViewChanged()
+void GuiViewSource::onBufferViewChanged()
{
widget_->setText();
widget_->setEnabled((bool)bufferview());
diff --git a/src/frontends/qt4/GuiViewSource.h
b/src/frontends/qt4/GuiViewSource.h
index f2bc1ce..873f8db 100644
--- a/src/frontends/qt4/GuiViewSource.h
+++ b/src/frontends/qt4/GuiViewSource.h
@@ -119,7 +119,7 @@ public:
public Q_SLOTS:
///
- void on_bufferViewChanged();//override
+ void onBufferViewChanged();//override
private Q_SLOTS:
/// The title displayed by the dialog reflects source type.