ソースを参照

Remove compiler warning

Kandrashin Denis 11 年 前
コミット
5a378858e8
3 ファイル変更13 行追加5 行削除
  1. 8 0
      source/fb2main.cpp
  2. 4 4
      source/fb2text.cpp
  3. 1 1
      source/fb2text.hpp

+ 8 - 0
source/fb2main.cpp

@@ -27,6 +27,7 @@ FbMainWindow::FbMainWindow(const QString &filename, ViewMode mode)
     , isSwitched(false)
     , isUntitled(true)
 {
+    Q_UNUSED(mode);
     connect(qApp, SIGNAL(logMessage(QtMsgType, QString)), SLOT(logMessage(QtMsgType, QString)));
 
     setUnifiedTitleAndToolBarOnMac(true);
@@ -50,16 +51,22 @@ FbMainWindow::FbMainWindow(const QString &filename, ViewMode mode)
 
 void FbMainWindow::warning(int row, int col, const QString &msg)
 {
+    Q_UNUSED(row);
+    Q_UNUSED(col);
     logMessage(QtWarningMsg, msg.simplified());
 }
 
 void FbMainWindow::error(int row, int col, const QString &msg)
 {
+    Q_UNUSED(row);
+    Q_UNUSED(col);
     logMessage(QtCriticalMsg, msg.simplified());
 }
 
 void FbMainWindow::fatal(int row, int col, const QString &msg)
 {
+    Q_UNUSED(row);
+    Q_UNUSED(col);
     logMessage(QtFatalMsg, msg.simplified());
 }
 
@@ -164,6 +171,7 @@ void FbMainWindow::createActions()
     FbTextEdit *text = mainDock->text();
     FbHeadEdit *head = mainDock->head();
     FbCodeEdit *code = mainDock->code();
+    Q_UNUSED(head)
 
     menu = menuBar()->addMenu(tr("&File"));
     tool = addToolBar(tr("File"));

+ 4 - 4
source/fb2text.cpp

@@ -37,14 +37,14 @@ FbTextAction::FbTextAction(const QIcon &icon, const QString &text, QWebPage::Web
 {
 }
 
-QAction * FbTextAction::action(QWebPage::WebAction action)
+QAction * FbTextAction::action()
 {
     return m_parent->pageAction(m_action);
 }
 
 void FbTextAction::updateAction()
 {
-    if (QAction * act = action(m_action)) {
+    if (QAction * act = action()) {
         if (isCheckable()) setChecked(act->isChecked());
         setEnabled(act->isEnabled());
     }
@@ -52,7 +52,7 @@ void FbTextAction::updateAction()
 
 void FbTextAction::connectAction()
 {
-    if (QAction * act = action(m_action)) {
+    if (QAction * act = action()) {
         connect(this, SIGNAL(triggered(bool)), act, SIGNAL(triggered(bool)));
         connect(act, SIGNAL(changed()), this, SLOT(updateAction()));
         if (isCheckable()) setChecked(act->isChecked());
@@ -65,7 +65,7 @@ void FbTextAction::connectAction()
 
 void FbTextAction::disconnectAction()
 {
-    QAction * act = action(m_action);
+    QAction * act = action();
     disconnect(act, 0, this, 0);
     disconnect(this, 0, act, 0);
 }

+ 1 - 1
source/fb2text.hpp

@@ -169,7 +169,7 @@ private slots:
     void updateAction();
 
 private:
-    QAction * action(QWebPage::WebAction action);
+    QAction * action();
 
 private:
     QWebPage::WebAction m_action;