Handle a bunch more clang warnings
This commit is contained in:
parent
dd0752e69f
commit
8b86306d48
@ -208,7 +208,6 @@ void dumpBacktrace(int dumpFile, CrashData crash)
|
|||||||
void dumpSysInfo(int dumpFile)
|
void dumpSysInfo(int dumpFile)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
bool gotSysInfo = false; // True if system info check succeeded
|
|
||||||
utsname sysinfo; // System information
|
utsname sysinfo; // System information
|
||||||
|
|
||||||
// Dump system info
|
// Dump system info
|
||||||
|
@ -1245,7 +1245,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
|
|||||||
return UNZ_PARAMERROR;
|
return UNZ_PARAMERROR;
|
||||||
|
|
||||||
|
|
||||||
if ((pfile_in_zip_read_info->read_buffer == NULL))
|
if (pfile_in_zip_read_info->read_buffer == NULL)
|
||||||
return UNZ_END_OF_LIST_OF_FILE;
|
return UNZ_END_OF_LIST_OF_FILE;
|
||||||
if (len==0)
|
if (len==0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -777,9 +777,9 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
|
|||||||
zi->ci.flag = 0;
|
zi->ci.flag = 0;
|
||||||
if ((level==8) || (level==9))
|
if ((level==8) || (level==9))
|
||||||
zi->ci.flag |= 2;
|
zi->ci.flag |= 2;
|
||||||
if ((level==2))
|
if (level==2)
|
||||||
zi->ci.flag |= 4;
|
zi->ci.flag |= 4;
|
||||||
if ((level==1))
|
if (level==1)
|
||||||
zi->ci.flag |= 6;
|
zi->ci.flag |= 6;
|
||||||
if (password != NULL)
|
if (password != NULL)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,10 @@ class IconPickerDialog : public QDialog
|
|||||||
public:
|
public:
|
||||||
explicit IconPickerDialog(QWidget *parent = 0);
|
explicit IconPickerDialog(QWidget *parent = 0);
|
||||||
~IconPickerDialog();
|
~IconPickerDialog();
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||||
int exec(QString selection);
|
int exec(QString selection);
|
||||||
|
#pragma clang diagnostic pop
|
||||||
QString selectedIconKey;
|
QString selectedIconKey;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -34,7 +34,11 @@ public:
|
|||||||
|
|
||||||
void updateSize();
|
void updateSize();
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||||
int exec(ProgressProvider *task);
|
int exec(ProgressProvider *task);
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
void setSkipButton(bool present, QString label = QString());
|
void setSkipButton(bool present, QString label = QString());
|
||||||
|
|
||||||
ProgressProvider *getTask();
|
ProgressProvider *getTask();
|
||||||
|
@ -27,7 +27,7 @@ namespace Ui
|
|||||||
class ScreenshotsPage;
|
class ScreenshotsPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScreenShot;
|
struct ScreenShot;
|
||||||
class ScreenshotList;
|
class ScreenshotList;
|
||||||
class ImgurAlbumCreation;
|
class ImgurAlbumCreation;
|
||||||
|
|
||||||
|
@ -214,10 +214,7 @@ void VersionPage::on_moveLibraryUpBtn_clicked()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
|
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
|
||||||
const int newRow = 0;
|
|
||||||
m_version->move(row, InstanceVersion::MoveUp);
|
m_version->move(row, InstanceVersion::MoveUp);
|
||||||
// ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
|
|
||||||
// QItemSelectionModel::ClearAndSelect);
|
|
||||||
}
|
}
|
||||||
catch (MMCError &e)
|
catch (MMCError &e)
|
||||||
{
|
{
|
||||||
@ -234,10 +231,7 @@ void VersionPage::on_moveLibraryDownBtn_clicked()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
|
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
|
||||||
const int newRow = 0;
|
|
||||||
m_version->move(row, InstanceVersion::MoveDown);
|
m_version->move(row, InstanceVersion::MoveDown);
|
||||||
// ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
|
|
||||||
// QItemSelectionModel::ClearAndSelect);
|
|
||||||
}
|
}
|
||||||
catch (MMCError &e)
|
catch (MMCError &e)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ class QDir;
|
|||||||
class QString;
|
class QString;
|
||||||
class QObject;
|
class QObject;
|
||||||
class ProgressProvider;
|
class ProgressProvider;
|
||||||
class BaseVersion;
|
struct BaseVersion;
|
||||||
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
|
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
|
||||||
|
|
||||||
class BaseInstaller
|
class BaseInstaller
|
||||||
|
@ -100,7 +100,10 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* Sorts the version list.
|
* Sorts the version list.
|
||||||
*/
|
*/
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||||
virtual void sort() = 0;
|
virtual void sort() = 0;
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
protected
|
protected
|
||||||
slots:
|
slots:
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "BaseVersion.h"
|
#include "BaseVersion.h"
|
||||||
#include "BaseInstance.h"
|
#include "BaseInstance.h"
|
||||||
|
|
||||||
class BaseVersion;
|
struct BaseVersion;
|
||||||
class BaseInstance;
|
class BaseInstance;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "VersionFilterData.h"
|
#include "VersionFilterData.h"
|
||||||
#include "minecraft/ParseUtils.h"
|
#include "minecraft/ParseUtils.h"
|
||||||
|
|
||||||
extern VersionFilterData g_VersionFilterData = VersionFilterData();
|
VersionFilterData g_VersionFilterData = VersionFilterData();
|
||||||
|
|
||||||
VersionFilterData::VersionFilterData()
|
VersionFilterData::VersionFilterData()
|
||||||
{
|
{
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
class AssetObject;
|
|
||||||
|
|
||||||
struct AssetObject
|
struct AssetObject
|
||||||
{
|
{
|
||||||
QString hash;
|
QString hash;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
class InstanceVersion;
|
class InstanceVersion;
|
||||||
class ForgeInstallTask;
|
class ForgeInstallTask;
|
||||||
class ForgeVersion;
|
struct ForgeVersion;
|
||||||
|
|
||||||
class ForgeInstaller : public BaseInstaller
|
class ForgeInstaller : public BaseInstaller
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "JarMod.h"
|
#include "JarMod.h"
|
||||||
|
|
||||||
class InstanceVersion;
|
class InstanceVersion;
|
||||||
struct VersionFile;
|
class VersionFile;
|
||||||
|
|
||||||
typedef std::shared_ptr<VersionFile> VersionFilePtr;
|
typedef std::shared_ptr<VersionFile> VersionFilePtr;
|
||||||
class VersionFile : public VersionPatch
|
class VersionFile : public VersionPatch
|
||||||
|
Loading…
Reference in New Issue
Block a user