Merge pull request #1537 from Trial97/warnings

This commit is contained in:
Sefa Eyeoglu 2023-10-04 09:40:38 +02:00 committed by GitHub
commit 03ad430699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View File

@ -89,6 +89,10 @@ function(
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf)
-Wimplicit-fallthrough # warn on statements that fallthrough without an explicit annotation
# -Wgnu-zero-variadic-macro-arguments (part of -pedantic) is triggered by every qCDebug() call and therefore results
# in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour
# instead of the exact standard wording so we can safely ignore it
-Wno-gnu-zero-variadic-macro-arguments
)
endif()

View File

@ -24,11 +24,11 @@
struct JavaInstall : public BaseVersion {
JavaInstall() {}
JavaInstall(QString id, QString arch, QString path) : id(id), arch(arch), path(path) {}
virtual QString descriptor() { return id.toString(); }
virtual QString descriptor() override { return id.toString(); }
virtual QString name() { return id.toString(); }
virtual QString name() override { return id.toString(); }
virtual QString typeString() const { return arch; }
virtual QString typeString() const override { return arch; }
virtual bool operator<(BaseVersion& a) override;
virtual bool operator>(BaseVersion& a) override;

View File

@ -330,7 +330,8 @@ void ResourceFolderModel::applyUpdates(QSet<QString>& current_set, QSet<QString>
// When you have a Qt build with assertions turned on, proceeding here will abort the application
if (added_set.size() > 0) {
beginInsertRows(QModelIndex(), m_resources.size(), m_resources.size() + added_set.size() - 1);
beginInsertRows(QModelIndex(), static_cast<int>(m_resources.size()),
static_cast<int>(m_resources.size() + added_set.size() - 1));
for (auto& added : added_set) {
auto res = new_resources[added];

View File

@ -82,7 +82,7 @@ class VersionSelectWidget : public QWidget {
void selectedVersionChanged(BaseVersion::Ptr version);
protected:
virtual void closeEvent(QCloseEvent*);
virtual void closeEvent(QCloseEvent*) override;
private slots:
void onTaskSucceeded();