1
0
Fork 0

GUI: fixed some warnings

This commit is contained in:
Mr. eXoDia 2014-08-09 11:30:01 +02:00
parent f419397b00
commit 3b34297d2f
3 changed files with 10 additions and 10 deletions

View File

@ -287,7 +287,7 @@ void MainWindow::refreshShortcuts()
void MainWindow::loadMRUList(int maxItems)
{
mMaxMRU = maxItems;
for(unsigned int i = 0; i < mMaxMRU; i++)
for(int i = 0; i < mMaxMRU; i++)
{
char currentFile[MAX_PATH] = "";
if(!BridgeSettingGet("Recent Files", QString().sprintf("%.2d", i + 1).toUtf8().constData(), currentFile))
@ -324,7 +324,7 @@ void MainWindow::removeMRUEntry(QString entry)
{
if(!entry.size())
return;
std::vector<QString>::iterator it;
QList<QString>::iterator it;
for(it = mMRUList.begin(); it != mMRUList.end(); ++it)
{
@ -369,7 +369,7 @@ void MainWindow::updateMRUMenu()
if(mMRUList.size() > 0)
{
list = fileMenu->actions();
for(unsigned int index = 0; index < mMRUList.size(); ++index)
for(int index = 0; index < mMRUList.size(); ++index)
{
fileMenu->addAction(new QAction(mMRUList.at(index), this));
fileMenu->actions().last()->setObjectName(QString("MRU").append(QString::number(index)));
@ -378,7 +378,7 @@ void MainWindow::updateMRUMenu()
}
}
QString MainWindow::getMRUEntry(size_t index)
QString MainWindow::getMRUEntry(int index)
{
QString path;
@ -505,7 +505,7 @@ void MainWindow::openFile()
//file is from open button
bool update = true;
if(fileToOpen == NULL || fileToOpen->objectName().compare("actionOpen") == 0)
for(unsigned int i = 0; i < mMRUList.size(); i++)
for(int i = 0; i < mMRUList.size(); i++)
if(mMRUList.at(i) == filename)
{
update = false;

View File

@ -123,8 +123,8 @@ private:
const char* mWindowMainTitle;
std::vector<QString> mMRUList;
unsigned int mMaxMRU;
QList<QString> mMRUList;
int mMaxMRU;
unsigned int lastException;
void loadMRUList(int maxItems);
@ -132,7 +132,7 @@ private:
void addMRUEntry(QString entry);
void removeMRUEntry(QString entry);
void updateMRUMenu();
QString getMRUEntry(size_t index);
QString getMRUEntry(int index);
//menu api
struct MenuEntryInfo

View File

@ -99,7 +99,7 @@ void PatchDialog::updatePatches()
size_t cbsize;
if(!DbgFunctions()->PatchEnum(0, &cbsize))
return;
int numPatches = cbsize / sizeof(DBGPATCHINFO);
int numPatches = (int)cbsize / sizeof(DBGPATCHINFO);
if(!numPatches)
return;
DBGPATCHINFO* patches = new DBGPATCHINFO[numPatches];
@ -439,7 +439,7 @@ void PatchDialog::on_btnPatchFile_clicked()
}
//open the save file dialog
int len = strlen(szModName);
int len = (int)strlen(szModName);
while(szModName[len] != '\\')
len--;
char szDirName[MAX_PATH] = "";