Handle a bunch more clang warnings

This commit is contained in:
Petr Mrázek 2014-07-01 01:23:49 +02:00
parent dd0752e69f
commit 8b86306d48
14 changed files with 19 additions and 18 deletions

View File

@ -208,7 +208,6 @@ void dumpBacktrace(int dumpFile, CrashData crash)
void dumpSysInfo(int dumpFile)
{
#ifdef Q_OS_UNIX
bool gotSysInfo = false; // True if system info check succeeded
utsname sysinfo; // System information
// Dump system info

View File

@ -1245,7 +1245,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
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;
if (len==0)
return 0;

View File

@ -777,9 +777,9 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
zi->ci.flag = 0;
if ((level==8) || (level==9))
zi->ci.flag |= 2;
if ((level==2))
if (level==2)
zi->ci.flag |= 4;
if ((level==1))
if (level==1)
zi->ci.flag |= 6;
if (password != NULL)
{

View File

@ -29,7 +29,10 @@ class IconPickerDialog : public QDialog
public:
explicit IconPickerDialog(QWidget *parent = 0);
~IconPickerDialog();
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
int exec(QString selection);
#pragma clang diagnostic pop
QString selectedIconKey;
protected:

View File

@ -34,7 +34,11 @@ public:
void updateSize();
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
int exec(ProgressProvider *task);
#pragma clang diagnostic pop
void setSkipButton(bool present, QString label = QString());
ProgressProvider *getTask();

View File

@ -27,7 +27,7 @@ namespace Ui
class ScreenshotsPage;
}
class ScreenShot;
struct ScreenShot;
class ScreenshotList;
class ImgurAlbumCreation;

View File

@ -214,10 +214,7 @@ void VersionPage::on_moveLibraryUpBtn_clicked()
try
{
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
const int newRow = 0;
m_version->move(row, InstanceVersion::MoveUp);
// ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
// QItemSelectionModel::ClearAndSelect);
}
catch (MMCError &e)
{
@ -234,10 +231,7 @@ void VersionPage::on_moveLibraryDownBtn_clicked()
try
{
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
const int newRow = 0;
m_version->move(row, InstanceVersion::MoveDown);
// ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
// QItemSelectionModel::ClearAndSelect);
}
catch (MMCError &e)
{

View File

@ -22,7 +22,7 @@ class QDir;
class QString;
class QObject;
class ProgressProvider;
class BaseVersion;
struct BaseVersion;
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
class BaseInstaller

View File

@ -100,7 +100,10 @@ public:
/*!
* Sorts the version list.
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
virtual void sort() = 0;
#pragma clang diagnostic pop
protected
slots:

View File

@ -22,7 +22,7 @@
#include "BaseVersion.h"
#include "BaseInstance.h"
class BaseVersion;
struct BaseVersion;
class BaseInstance;
/*!

View File

@ -1,7 +1,7 @@
#include "VersionFilterData.h"
#include "minecraft/ParseUtils.h"
extern VersionFilterData g_VersionFilterData = VersionFilterData();
VersionFilterData g_VersionFilterData = VersionFilterData();
VersionFilterData::VersionFilterData()
{

View File

@ -18,8 +18,6 @@
#include <QString>
#include <QMap>
class AssetObject;
struct AssetObject
{
QString hash;

View File

@ -22,7 +22,7 @@
class InstanceVersion;
class ForgeInstallTask;
class ForgeVersion;
struct ForgeVersion;
class ForgeInstaller : public BaseInstaller
{

View File

@ -12,7 +12,7 @@
#include "JarMod.h"
class InstanceVersion;
struct VersionFile;
class VersionFile;
typedef std::shared_ptr<VersionFile> VersionFilePtr;
class VersionFile : public VersionPatch