fhackenberger / ktikz

KtikZ provides a nice user interface for making pictures using TikZ.
Other
348 stars 34 forks source link

Some compilations warnings #32

Closed ArchangeGabriel closed 5 years ago

ArchangeGabriel commented 5 years ago

Just in case they wouldn’t show for you, here are some compilations warning I’ve noticed:

/build/ktikz/src/ktikz-0.12/common/templatewidget.cpp: In member function ‘void TemplateWidget::editTemplateFile()’:
/build/ktikz/src/ktikz-0.12/common/templatewidget.cpp:184:76: warning: ‘static bool KRun::runUrl(const QUrl&, const QString&, QWidget*, bool, bool, const QString&, const QByteArray&)’ is deprecated [-Wdeprecated-declarations]
  KRun::runUrl( Url( fileName() ), QStringLiteral( "text/plain" ), NULL,  0 );
                                                                            ^
In file included from /usr/include/KF5/KIOWidgets/KRun:1,
                 from /build/ktikz/src/ktikz-0.12/common/templatewidget.cpp:22:
/usr/include/KF5/KIOWidgets/krun.h:302:39: note: declared here
     static bool KIOWIDGETS_DEPRECATED runUrl(const QUrl &url, const QString &mimetype, QWidget *window,
                                       ^~~~~~
/build/ktikz/src/ktikz-0.12/common/templatewidget.cpp:184:76: warning: ‘static bool KRun::runUrl(const QUrl&, const QString&, QWidget*, bool, bool, const QString&, const QByteArray&)’ is deprecated [-Wdeprecated-declarations]
  KRun::runUrl( Url( fileName() ), QStringLiteral( "text/plain" ), NULL,  0 );
                                                                            ^
In file included from /usr/include/KF5/KIOWidgets/KRun:1,
                 from /build/ktikz/src/ktikz-0.12/common/templatewidget.cpp:22:
/usr/include/KF5/KIOWidgets/krun.h:302:39: note: declared here
     static bool KIOWIDGETS_DEPRECATED runUrl(const QUrl &url, const QString &mimetype, QWidget *window,
                                       ^~~~~~
/build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp: In constructor ‘LineEdit::LineEdit(const QString&, QWidget*)’:
/build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp:17:26: warning: ‘void KLineEdit::setClearButtonShown(bool)’ is deprecated [-Wdeprecated-declarations]
  setClearButtonShown(true);
                          ^
In file included from /usr/include/KF5/KCompletion/KLineEdit:1,
                 from /build/ktikz/src/ktikz-0.12/common/utils/lineedit.h:15,
                 from /build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp:11:
/usr/include/KF5/KCompletion/klineedit.h:371:33: note: declared here
     KCOMPLETION_DEPRECATED void setClearButtonShown(bool show);
                                 ^~~~~~~~~~~~~~~~~~~
/build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp: In constructor ‘LineEdit::LineEdit(QWidget*)’:
/build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp:23:26: warning: ‘void KLineEdit::setClearButtonShown(bool)’ is deprecated [-Wdeprecated-declarations]
  setClearButtonShown(true);
                          ^
In file included from /usr/include/KF5/KCompletion/KLineEdit:1,
                 from /build/ktikz/src/ktikz-0.12/common/utils/lineedit.h:15,
                 from /build/ktikz/src/ktikz-0.12/common/utils/lineedit.cpp:11:
/usr/include/KF5/KCompletion/klineedit.h:371:33: note: declared here
     KCOMPLETION_DEPRECATED void setClearButtonShown(bool show);
                                 ^~~~~~~~~~~~~~~~~~~
/build/ktikz/src/ktikz-0.12/app/main.cpp: In function ‘void debugOutput(QtMsgType, const QMessageLogContext&, const QString&)’:
/build/ktikz/src/ktikz-0.12/app/main.cpp:56:9: warning: enumeration value ‘QtInfoMsg’ not handled in switch [-Wswitch]
  switch (type)
         ^
/build/ktikz/src/ktikz-0.12/app/tikzcommandinserter.cpp:187:24: warning: ‘TikzCommandList getCommands(QXmlStreamReader*, QList<TikzCommand>*)’ defined but not used [-Wunused-function]
 static TikzCommandList getCommands(QXmlStreamReader *xml, QList<TikzCommand> *tikzCommandsList)
                        ^~~~~~~~~~~
/build/ktikz/src/ktikz-0.12/app/mainwindow.cpp: In member function ‘void MainWindow::setCurrentEncoding(QTextCodec*, bool)’:
/build/ktikz/src/ktikz-0.12/app/mainwindow.cpp:1026:61: warning: unused parameter ‘isUserRequest’ [-Wunused-parameter]
 void MainWindow::setCurrentEncoding(QTextCodec *codec, bool isUserRequest)
                                                        ~~~~~^~~~~~~~~~~~~
jfmcarreira commented 5 years ago

Thanks for the feedback. I will take a look at them.

jfmcarreira commented 5 years ago

Fixed in this commit

ArchangeGabriel commented 5 years ago

Good, only one of them remains:

/build/ktikz/src/ktikz-0.12/app/tikzcommandinserter.cpp:187:24: warning: ‘TikzCommandList getCommands(QXmlStreamReader*, QList<TikzCommand>*)’ defined but not used [-Wunused-function]
 static TikzCommandList getCommands(QXmlStreamReader *xml, QList<TikzCommand> *tikzCommandsList)
                        ^~~~~~~~~~~
/build/ktikz/src/ktikz-0.12/app/mainwindow.cpp: In member function ‘void MainWindow::setCurrentEncoding(QTextCodec*, bool)’:
/build/ktikz/src/ktikz-0.12/app/mainwindow.cpp:1026:61: warning: unused parameter ‘isUserRequest’ [-Wunused-parameter]
 void MainWindow::setCurrentEncoding(QTextCodec *codec, bool isUserRequest)
                                                        ~~~~~^~~~~~~~~~~~~
jfmcarreira commented 5 years ago

Thanks for that. I only solved the deprecated ones.