GCC warnings (#1725)

This commit is contained in:
Alexander Bock
2021-08-21 11:42:44 +02:00
committed by GitHub
parent 2f32ddaf28
commit db472030de
42 changed files with 67 additions and 97 deletions

View File

@@ -38,7 +38,7 @@ class QListWidget;
class QPushButton;
class QTextEdit;
class ActionDialog : public QDialog {
class ActionDialog final : public QDialog {
Q_OBJECT
public:
ActionDialog(QWidget* parent,

View File

@@ -29,7 +29,7 @@
class QTextEdit;
class AdditionalScriptsDialog : public QDialog {
class AdditionalScriptsDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -32,7 +32,7 @@
class QTextEdit;
class QTreeView;
class AssetsDialog : public QDialog {
class AssetsDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -31,7 +31,7 @@
#include "openspace/scene/profile.h"
#include <memory>
class AssetTreeModel : public QAbstractItemModel {
class AssetTreeModel final : public QAbstractItemModel {
Q_OBJECT
public:
@@ -45,7 +45,7 @@ public:
* function (can be multiple times)
* \return QVariant data object
*/
QVariant data(const QModelIndex& index, int role) const override;
QVariant data(const QModelIndex& index, int role) const final;
/**
* Returns the header data of the tree view
@@ -57,7 +57,7 @@ public:
* \return QVariant data object in the header
*/
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
int role = Qt::DisplayRole) const final;
/**
* Returns the index of item in #QModelIndex object form
@@ -68,7 +68,7 @@ public:
* \return #QModelIndex index of the item at specified position
*/
QModelIndex index(int row, int column,
const QModelIndex& parent = QModelIndex()) const override;
const QModelIndex& parent = QModelIndex()) const final;
/**
* Returns the index of the parent of the item specified by input param
@@ -76,7 +76,7 @@ public:
* \param index of item that is a child of the parent
* \return #QModelIndex index of the parent
*/
QModelIndex parent(const QModelIndex& index) const override;
QModelIndex parent(const QModelIndex& index) const final;
/**
* Returns the index of the parent of the item specified by the input params
@@ -103,7 +103,7 @@ public:
* \param parent #QModelIndex of the parent item
* \return number of children/rows of this parent
*/
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const final;
/**
* Returns the number of columns of data in each item of the tree
@@ -111,7 +111,7 @@ public:
* \param parent specified by the #QModelIndex index
* \return the number of data columns
*/
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const final;
/**
* Return the Qt flags of the item specified by index, which can include
@@ -120,7 +120,7 @@ public:
* \param index specified by the #QModelIndex index
* \return the Qt flags
*/
Qt::ItemFlags flags(const QModelIndex& index) const override;
Qt::ItemFlags flags(const QModelIndex& index) const final;
/**
* Set data at index \p index
@@ -131,7 +131,7 @@ public:
* \return true if the data set was successful
*/
bool setData(const QModelIndex& index, const QVariant& value,
int role = Qt::EditRole) override;
int role = Qt::EditRole) final;
/**
* Returns a vector of all #Assets selected in the tree view

View File

@@ -34,7 +34,7 @@ class QLabel;
class QLineEdit;
class QTabWidget;
class CameraDialog : public QDialog {
class CameraDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -33,7 +33,7 @@ class QListWidget;
class QLineEdit;
class QPushButton;
class DeltaTimesDialog : public QDialog {
class DeltaTimesDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -32,7 +32,7 @@ class QListWidget;
class QListWidgetItem;
class QPushButton;
class MarkNodesDialog : public QDialog {
class MarkNodesDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -33,7 +33,7 @@
class QLineEdit;
class QTextEdit;
class MetaDialog : public QDialog {
class MetaDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -35,7 +35,7 @@ class QLineEdit;
class QListWidget;
class QPushButton;
class ModulesDialog : public QDialog {
class ModulesDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -36,7 +36,7 @@ class QLabel;
class QLineEdit;
class QTextEdit;
class ProfileEdit : public QDialog {
class ProfileEdit final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -36,7 +36,7 @@ class QLineEdit;
class QListWidget;
class QPushButton;
class PropertiesDialog : public QDialog {
class PropertiesDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -28,7 +28,7 @@
#include <QDialog>
#include <QListWidget>
class ScriptlogDialog : public QDialog {
class ScriptlogDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -34,7 +34,7 @@ class QDateTimeEdit;
class QLabel;
class QLineEdit;
class TimeDialog : public QDialog {
class TimeDialog final : public QDialog {
Q_OBJECT
public:
/**

View File

@@ -65,8 +65,8 @@ ActionDialog::ActionDialog(QWidget* parent,
std::vector<openspace::Profile::Keybinding>* keybindings)
: QDialog(parent)
, _actions(actions)
, _keybindings(keybindings)
, _actionData(*_actions)
, _keybindings(keybindings)
, _keybindingsData(*_keybindings)
{
setWindowTitle("Actions and Keybindings");
@@ -512,9 +512,7 @@ void ActionDialog::actionSaved() {
const auto it = std::find_if(
_actionData.begin(), _actionData.end(),
[id = newIdentifier](const Profile::Action& action) {
return action.identifier == id;
}
[id = newIdentifier](const Profile::Action& a) { return a.identifier == id; }
);
if (it != _actionData.end()) {
QMessageBox::critical(

View File

@@ -960,7 +960,7 @@ void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& ha
}
std::string setWindowConfigPresetForGui(const std::string labelFromCfgFile,
const std::string xmlExt, bool haveCliSGCTConfig,
bool haveCliSGCTConfig,
const std::string& sgctFunctionName)
{
configuration::Configuration& config = *global::configuration;
@@ -1046,8 +1046,9 @@ int main(int argc, char* argv[]) {
//
// Parse commandline arguments
//
char* prgName = argv[0];
ghoul::cmdparser::CommandlineParser parser(
std::string(argv[0]),
std::string(prgName),
ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes
);
@@ -1159,7 +1160,6 @@ int main(int argc, char* argv[]) {
const std::string xmlExt = ".xml";
std::string windowCfgPreset = setWindowConfigPresetForGui(
labelFromCfgFile,
xmlExt,
hasSGCTConfig,
sgctFunctionName
);

View File

@@ -129,4 +129,4 @@ int main(int argc, char** argv) {
LINFO("Server stopped");
return 0;
};
}