NOISSUE fix all sorts of warnings, enable Werror
and pedantic
This commit is contained in:
@ -34,4 +34,4 @@ namespace DesktopServices
|
||||
* Open the URL, most likely in a browser. Maybe.
|
||||
*/
|
||||
MULTIMC_GUI_EXPORT bool openUrl(const QUrl &url);
|
||||
};
|
||||
}
|
||||
|
@ -7,8 +7,9 @@
|
||||
|
||||
class QUrl;
|
||||
|
||||
struct MULTIMC_LOGIC_EXPORT Version
|
||||
class MULTIMC_LOGIC_EXPORT Version
|
||||
{
|
||||
public:
|
||||
Version(const QString &str);
|
||||
Version() {}
|
||||
|
||||
|
@ -80,4 +80,4 @@ void serializeRequires(QJsonObject & objOut, RequireSet* ptr, const char * keyNa
|
||||
MetadataVersion currentFormatVersion();
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(std::set<Meta::Require>);
|
||||
Q_DECLARE_METATYPE(std::set<Meta::Require>)
|
||||
|
@ -145,7 +145,7 @@ QDateTime Component::getReleaseDateTime()
|
||||
bool Component::isEnabled()
|
||||
{
|
||||
return !canBeDisabled() || !m_disabled;
|
||||
};
|
||||
}
|
||||
|
||||
bool Component::canBeDisabled()
|
||||
{
|
||||
@ -171,7 +171,7 @@ bool Component::setEnabled(bool state)
|
||||
bool Component::isCustom()
|
||||
{
|
||||
return m_file != nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
bool Component::isCustomizable()
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(OpSys system, class
|
||||
bool local = isLocal();
|
||||
bool isForge = (hint() == "forge-pack-xz");
|
||||
|
||||
auto add_download = [&](QString storage, QString url, QString sha1 = QString())
|
||||
auto add_download = [&](QString storage, QString url, QString sha1)
|
||||
{
|
||||
auto entry = cache->resolveEntry("libraries", storage);
|
||||
if(isAlwaysStale)
|
||||
@ -208,14 +208,14 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(OpSys system, class
|
||||
{
|
||||
QString cooked_storage = raw_storage;
|
||||
QString cooked_dl = raw_dl;
|
||||
add_download(cooked_storage.replace("${arch}", "32"), cooked_dl.replace("${arch}", "32"));
|
||||
add_download(cooked_storage.replace("${arch}", "32"), cooked_dl.replace("${arch}", "32"), QString());
|
||||
cooked_storage = raw_storage;
|
||||
cooked_dl = raw_dl;
|
||||
add_download(cooked_storage.replace("${arch}", "64"), cooked_dl.replace("${arch}", "64"));
|
||||
add_download(cooked_storage.replace("${arch}", "64"), cooked_dl.replace("${arch}", "64"), QString());
|
||||
}
|
||||
else
|
||||
{
|
||||
add_download(raw_storage, raw_dl);
|
||||
add_download(raw_storage, raw_dl, QString());
|
||||
}
|
||||
}
|
||||
return out;
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
MinecraftInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir);
|
||||
virtual ~MinecraftInstance() {};
|
||||
virtual void init() override;
|
||||
virtual void saveNow();
|
||||
virtual void saveNow() override;
|
||||
|
||||
// FIXME: remove
|
||||
QString typeName() const override;
|
||||
|
@ -275,7 +275,7 @@ static QString read_string (nbt::value& parent, const char * name, const QString
|
||||
qWarning() << "NBT tag" << name << "could not be converted to string. Defaulting to" << fallback;
|
||||
return fallback;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static int64_t read_long (nbt::value& parent, const char * name, const int64_t & fallback = 0)
|
||||
{
|
||||
@ -301,7 +301,7 @@ static int64_t read_long (nbt::value& parent, const char * name, const int64_t &
|
||||
qWarning() << "NBT tag" << name << "could not be converted to long. Defaulting to" << fallback;
|
||||
return fallback;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void World::loadFromLevelDat(QByteArray data)
|
||||
{
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
explicit ModMinecraftJar(LaunchTask *parent) : LaunchStep(parent) {};
|
||||
virtual ~ModMinecraftJar(){};
|
||||
|
||||
virtual void executeTask();
|
||||
virtual bool canAbort() const
|
||||
virtual void executeTask() override;
|
||||
virtual bool canAbort() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ void FtbPackInstallTask::onDownloadProgress(qint64 current, qint64 total)
|
||||
{
|
||||
abortable = true;
|
||||
progress(current, total * 4);
|
||||
setStatus(tr("Downloading zip for %1 (%2\%)").arg(m_pack.name).arg(current / 10));
|
||||
setStatus(tr("Downloading zip for %1 (%2%)").arg(m_pack.name).arg(current / 10));
|
||||
}
|
||||
|
||||
void FtbPackInstallTask::unzip()
|
||||
|
@ -10,12 +10,12 @@ FileSink::FileSink(QString filename)
|
||||
:m_filename(filename)
|
||||
{
|
||||
// nil
|
||||
};
|
||||
}
|
||||
|
||||
FileSink::~FileSink()
|
||||
{
|
||||
// nil
|
||||
};
|
||||
}
|
||||
|
||||
JobStatus FileSink::init(QNetworkRequest& request)
|
||||
{
|
||||
|
@ -10,12 +10,12 @@ MetaCacheSink::MetaCacheSink(MetaEntryPtr entry, ChecksumValidator * md5sum)
|
||||
:Net::FileSink(entry->getFullPath()), m_entry(entry), m_md5Node(md5sum)
|
||||
{
|
||||
addValidator(md5sum);
|
||||
};
|
||||
}
|
||||
|
||||
MetaCacheSink::~MetaCacheSink()
|
||||
{
|
||||
// nil
|
||||
};
|
||||
}
|
||||
|
||||
JobStatus MetaCacheSink::initCache(QNetworkRequest& request)
|
||||
{
|
||||
|
@ -133,4 +133,4 @@ bool MULTIMC_LOGIC_EXPORT processFileLists
|
||||
bool MULTIMC_LOGIC_EXPORT fixPathForOSX(QString &path);
|
||||
|
||||
}
|
||||
Q_DECLARE_METATYPE(GoUpdate::Status);
|
||||
Q_DECLARE_METATYPE(GoUpdate::Status)
|
||||
|
Reference in New Issue
Block a user