1
0
Fork 0

DBG+GUI+PROJECT: switched to Qt 5.6.0 (check the wiki for an updated compile guide)

pull/699/head
mrexodia 2016-06-02 09:46:54 +02:00
parent 69aa29fd4a
commit cd0fe880da
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
34 changed files with 1007 additions and 1011 deletions

View File

@ -7,14 +7,20 @@ echo qt_base
mkdir %RELEASEDIR%\qt_base
mkdir %RELEASEDIR%\qt_base\x32
mkdir %RELEASEDIR%\qt_base\x32\platforms
mkdir %RELEASEDIR%\qt_base\x64
mkdir %RELEASEDIR%\qt_base\x64\platforms
copy bin\x32\QtCore4.dll %RELEASEDIR%\qt_base\x32\QtCore4.dll
copy bin\x32\QtGui4.dll %RELEASEDIR%\qt_base\x32\QtGui4.dll
copy bin\x32\QtNetwork4.dll %RELEASEDIR%\qt_base\x32\QtNetwork4.dll
copy bin\x64\QtCore4.dll %RELEASEDIR%\qt_base\x64\QtCore4.dll
copy bin\x64\QtGui4.dll %RELEASEDIR%\qt_base\x64\QtGui4.dll
copy bin\x64\QtNetwork4.dll %RELEASEDIR%\qt_base\x64\QtNetwork4.dll
copy bin\x32\Qt5Core.dll %RELEASEDIR%\qt_base\x32\
copy bin\x32\Qt5Gui.dll %RELEASEDIR%\qt_base\x32\
copy bin\x32\Qt5Widgets.dll %RELEASEDIR%\qt_base\x32\
copy bin\x32\Qt5Network.dll %RELEASEDIR%\qt_base\x32\
copy bin\x32\platforms\qwindows.dll %RELEASEDIR%\qt_base\x32\platforms\
copy bin\x64\Qt5Core.dll %RELEASEDIR%\qt_base\x64\
copy bin\x64\Qt5Gui.dll %RELEASEDIR%\qt_base\x64\
copy bin\x64\Qt5Widgets.dll %RELEASEDIR%\qt_base\x64\
copy bin\x64\Qt5Network.dll %RELEASEDIR%\qt_base\x64\
copy bin\x64\platforms\qwindows.dll %RELEASEDIR%\qt_base\x64\platforms\
echo bin_base
@ -22,32 +28,32 @@ mkdir %RELEASEDIR%\bin_base
mkdir %RELEASEDIR%\bin_base\x32
mkdir %RELEASEDIR%\bin_base\x64
copy bin\x32\x32_bridge.dll %RELEASEDIR%\bin_base\x32\x32_bridge.dll
copy bin\x32\x32_dbg.dll %RELEASEDIR%\bin_base\x32\x32_dbg.dll
copy bin\x32\capstone.dll %RELEASEDIR%\bin_base\x32\capstone.dll
copy bin\x32\dbghelp.dll %RELEASEDIR%\bin_base\x32\dbghelp.dll
copy bin\x32\symsrv.dll %RELEASEDIR%\bin_base\x32\symsrv.dll
copy bin\x32\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x32\DeviceNameResolver.dll
copy bin\x32\Scylla.dll %RELEASEDIR%\bin_base\x32\Scylla.dll
copy bin\x32\jansson.dll %RELEASEDIR%\bin_base\x32\jansson.dll
copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\lz4.dll
copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\TitanEngine.dll
copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\XEDParse.dll
copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\yara.dll
copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\snowman.dll
copy bin\x64\x64_bridge.dll %RELEASEDIR%\bin_base\x64\x64_bridge.dll
copy bin\x64\x64_dbg.dll %RELEASEDIR%\bin_base\x64\x64_dbg.dll
copy bin\x64\capstone.dll %RELEASEDIR%\bin_base\x64\capstone.dll
copy bin\x64\dbghelp.dll %RELEASEDIR%\bin_base\x64\dbghelp.dll
copy bin\x64\symsrv.dll %RELEASEDIR%\bin_base\x64\symsrv.dll
copy bin\x64\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x64\DeviceNameResolver.dll
copy bin\x64\Scylla.dll %RELEASEDIR%\bin_base\x64\Scylla.dll
copy bin\x64\jansson.dll %RELEASEDIR%\bin_base\x64\jansson.dll
copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\lz4.dll
copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\TitanEngine.dll
copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\XEDParse.dll
copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\yara.dll
copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\snowman.dll
copy bin\x32\x32_bridge.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\x32_dbg.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\capstone.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\dbghelp.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\symsrv.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\Scylla.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\jansson.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\
copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\
copy bin\x64\x64_bridge.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\x64_dbg.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\capstone.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\dbghelp.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\symsrv.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\Scylla.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\jansson.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\
copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\
echo help
@ -118,22 +124,22 @@ mkdir %RELEASEDIR%\release\x64
copy bin\x96dbg.exe %RELEASEDIR%\release\x96dbg.exe
copy bin\mnemdb.json %RELEASEDIR%\release\mnemdb.json
xcopy src\gui\Translations\*.qm %RELEASEDIR%\release\translations /S /Y
copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\x32bridge.dll
copy bin\x32\x32bridge.pdb %RELEASEDIR%\release\x32\x32bridge.pdb
copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\x32dbg.dll
copy bin\x32\x32dbg.pdb %RELEASEDIR%\release\x32\x32dbg.pdb
copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\x32dbg.exe
copy bin\x32\x32dbg_exe.pdb %RELEASEDIR%\release\x32\x32dbg_exe.pdb
copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\x32gui.dll
copy bin\x32\x32gui.pdb %RELEASEDIR%\release\x32\x32gui.pdb
copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\x64bridge.dll
copy bin\x64\x64bridge.pdb %RELEASEDIR%\release\x64\x64bridge.pdb
copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\x64dbg.dll
copy bin\x64\x64dbg.pdb %RELEASEDIR%\release\x64\x64dbg.pdb
copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\x64dbg.exe
copy bin\x64\x64dbg_exe.pdb %RELEASEDIR%\release\x64\x64dbg_exe.pdb
copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\x64gui.dll
copy bin\x64\x64gui.pdb %RELEASEDIR%\release\x64\x64gui.pdb
copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\
copy bin\x32\x32bridge.pdb %RELEASEDIR%\release\x32\
copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\
copy bin\x32\x32dbg.pdb %RELEASEDIR%\release\x32\
copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\
copy bin\x32\x32dbg_exe.pdb %RELEASEDIR%\release\x32\
copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\
copy bin\x32\x32gui.pdb %RELEASEDIR%\release\x32\
copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\
copy bin\x64\x64bridge.pdb %RELEASEDIR%\release\x64\
copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\
copy bin\x64\x64dbg.pdb %RELEASEDIR%\release\x64\
copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\
copy bin\x64\x64dbg_exe.pdb %RELEASEDIR%\release\x64\
copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\
copy bin\x64\x64gui.pdb %RELEASEDIR%\release\x64\
xcopy %RELEASEDIR%\qt_base %RELEASEDIR%\release /S /Y
xcopy %RELEASEDIR%\bin_base %RELEASEDIR%\release /S /Y

View File

@ -2,9 +2,9 @@
if "%OLDPATH%"=="" set OLDPATH=%PATH%
if "%QT32PATH%"=="" set QT32PATH=c:\Qt\qt-4.8.6-x86-msvc2013\qt-4.8.6-x86-msvc2013\bin
if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-4.8.6-x64-msvc2013\qt-4.8.6-x64-msvc2013\bin
if "%QTCREATORPATH%"=="" set QTCREATORPATH=c:\Qt\qtcreator-3.1.1\bin
if "%QT32PATH%"=="" set QT32PATH=c:\Qt\qt-5.6.0-x86-msvc2013\5.6\msvc2013\bin
if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-5.6.0-x64-msvc2013\5.6\msvc2013_64\bin
if "%QTCREATORPATH%"=="" set QTCREATORPATH=c:\Qt\qtcreator-4.0.0\bin
if "%VSVARSALLPATH%"=="" set VSVARSALLPATH=c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
if "%COVERITYPATH%"=="" set COVERITYPATH=c:\coverity\bin
if "%DOXYGENPATH%"=="" set DOXYGENPATH=C:\Program Files\doxygen\bin

View File

@ -589,69 +589,78 @@ extern "C" DLL_EXPORT duint _dbg_getbranchdestination(duint addr)
if(!cp.Disassemble(addr, data))
return 0;
if(cp.InGroup(CS_GRP_JUMP) || cp.InGroup(CS_GRP_CALL) || cp.IsLoop())
return cp.ResolveOpValue(0, [](x86_reg reg) -> size_t
{
switch(reg)
auto opValue = cp.ResolveOpValue(0, [](x86_reg reg) -> size_t
{
switch(reg)
{
#ifndef _WIN64 //x32
case X86_REG_EAX:
return GetContextDataEx(hActiveThread, UE_EAX);
case X86_REG_EBX:
return GetContextDataEx(hActiveThread, UE_EBX);
case X86_REG_ECX:
return GetContextDataEx(hActiveThread, UE_ECX);
case X86_REG_EDX:
return GetContextDataEx(hActiveThread, UE_EDX);
case X86_REG_EBP:
return GetContextDataEx(hActiveThread, UE_EBP);
case X86_REG_ESP:
return GetContextDataEx(hActiveThread, UE_ESP);
case X86_REG_ESI:
return GetContextDataEx(hActiveThread, UE_ESI);
case X86_REG_EDI:
return GetContextDataEx(hActiveThread, UE_EDI);
case X86_REG_EIP:
return GetContextDataEx(hActiveThread, UE_EIP);
case X86_REG_EAX:
return GetContextDataEx(hActiveThread, UE_EAX);
case X86_REG_EBX:
return GetContextDataEx(hActiveThread, UE_EBX);
case X86_REG_ECX:
return GetContextDataEx(hActiveThread, UE_ECX);
case X86_REG_EDX:
return GetContextDataEx(hActiveThread, UE_EDX);
case X86_REG_EBP:
return GetContextDataEx(hActiveThread, UE_EBP);
case X86_REG_ESP:
return GetContextDataEx(hActiveThread, UE_ESP);
case X86_REG_ESI:
return GetContextDataEx(hActiveThread, UE_ESI);
case X86_REG_EDI:
return GetContextDataEx(hActiveThread, UE_EDI);
case X86_REG_EIP:
return GetContextDataEx(hActiveThread, UE_EIP);
#else //x64
case X86_REG_RAX:
return GetContextDataEx(hActiveThread, UE_RAX);
case X86_REG_RBX:
return GetContextDataEx(hActiveThread, UE_RBX);
case X86_REG_RCX:
return GetContextDataEx(hActiveThread, UE_RCX);
case X86_REG_RDX:
return GetContextDataEx(hActiveThread, UE_RDX);
case X86_REG_RBP:
return GetContextDataEx(hActiveThread, UE_RBP);
case X86_REG_RSP:
return GetContextDataEx(hActiveThread, UE_RSP);
case X86_REG_RSI:
return GetContextDataEx(hActiveThread, UE_RSI);
case X86_REG_RDI:
return GetContextDataEx(hActiveThread, UE_RDI);
case X86_REG_RIP:
return GetContextDataEx(hActiveThread, UE_RIP);
case X86_REG_R8:
return GetContextDataEx(hActiveThread, UE_R8);
case X86_REG_R9:
return GetContextDataEx(hActiveThread, UE_R9);
case X86_REG_R10:
return GetContextDataEx(hActiveThread, UE_R10);
case X86_REG_R11:
return GetContextDataEx(hActiveThread, UE_R11);
case X86_REG_R12:
return GetContextDataEx(hActiveThread, UE_R12);
case X86_REG_R13:
return GetContextDataEx(hActiveThread, UE_R13);
case X86_REG_R14:
return GetContextDataEx(hActiveThread, UE_R14);
case X86_REG_R15:
return GetContextDataEx(hActiveThread, UE_R15);
case X86_REG_RAX:
return GetContextDataEx(hActiveThread, UE_RAX);
case X86_REG_RBX:
return GetContextDataEx(hActiveThread, UE_RBX);
case X86_REG_RCX:
return GetContextDataEx(hActiveThread, UE_RCX);
case X86_REG_RDX:
return GetContextDataEx(hActiveThread, UE_RDX);
case X86_REG_RBP:
return GetContextDataEx(hActiveThread, UE_RBP);
case X86_REG_RSP:
return GetContextDataEx(hActiveThread, UE_RSP);
case X86_REG_RSI:
return GetContextDataEx(hActiveThread, UE_RSI);
case X86_REG_RDI:
return GetContextDataEx(hActiveThread, UE_RDI);
case X86_REG_RIP:
return GetContextDataEx(hActiveThread, UE_RIP);
case X86_REG_R8:
return GetContextDataEx(hActiveThread, UE_R8);
case X86_REG_R9:
return GetContextDataEx(hActiveThread, UE_R9);
case X86_REG_R10:
return GetContextDataEx(hActiveThread, UE_R10);
case X86_REG_R11:
return GetContextDataEx(hActiveThread, UE_R11);
case X86_REG_R12:
return GetContextDataEx(hActiveThread, UE_R12);
case X86_REG_R13:
return GetContextDataEx(hActiveThread, UE_R13);
case X86_REG_R14:
return GetContextDataEx(hActiveThread, UE_R14);
case X86_REG_R15:
return GetContextDataEx(hActiveThread, UE_R15);
#endif //_WIN64
default:
return 0;
default:
return 0;
}
});
if(cp[0].type == X86_OP_MEM)
{
if(MemRead(opValue, &opValue, sizeof(opValue)))
return opValue;
}
});
else
return opValue;
}
if(cp.InGroup(CS_GRP_RET))
{
auto csp = GetContextDataEx(hActiveThread, UE_CSP);

View File

@ -10,9 +10,7 @@ AppearanceDialog::AppearanceDialog(QWidget* parent) : QDialog(parent), ui(new Ui
ui->setupUi(this);
//set window flags
setModal(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
//Colors
colorMap = &Config()->Colors;

View File

@ -11,10 +11,7 @@ AssembleDialog::AssembleDialog(QWidget* parent) :
ui->setupUi(this);
setModal(true);
setFixedSize(this->size()); //fixed size
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
mSelectedInstrVa = 0;
bKeepSizeChecked = false;

View File

@ -6,9 +6,7 @@
AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AttachDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
// Setup actions/shortcuts
//

View File

@ -223,6 +223,7 @@ void CPUArgumentWidget::setupTable()
{
connect(mTable, SIGNAL(contextMenuSignal(QPoint)), this, SLOT(contextMenuSlot(QPoint)));
mTable->verticalScrollBar()->setStyleSheet(ConfigVScrollBarStyle());
mTable->horizontalScrollBar()->setStyleSheet(ConfigHScrollBarStyle());
mTable->enableMultiSelection(false);
mTable->setShowHeader(false);
mTable->addColumnAt(0, "", false);

View File

@ -4,9 +4,7 @@
CalculatorDialog::CalculatorDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CalculatorDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
connect(this, SIGNAL(validAddress(bool)), ui->btnGoto, SLOT(setEnabled(bool)));
connect(this, SIGNAL(validAddress(bool)), ui->btnGotoDump, SLOT(setEnabled(bool)));

View File

@ -1,15 +1,14 @@
#include "CloseDialog.h"
#include "ui_CloseDialog.h"
#include "MiscUtil.h"
CloseDialog::CloseDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CloseDialog)
{
ui->setupUi(this);
setModal(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags((Qt::Tool | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint) & ~Qt::WindowCloseButtonHint);
#endif
setWindowFlags(windowFlags() & ~(Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint) | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
//setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint));
SetApplicationIcon(QDialog::winId());
bCanClose = false;
}

View File

@ -5,9 +5,7 @@
DataCopyDialog::DataCopyDialog(const QVector<byte_t>* data, QWidget* parent) : QDialog(parent), ui(new Ui::DataCopyDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
mData = data;

View File

@ -8,9 +8,7 @@ EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
mBp(bp)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setWindowTitle(QString("Edit Breakpoint %1").arg(ToHexString(bp.addr)));
setWindowIcon(QIcon(":/icons/images/breakpoint.png"));

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +1,105 @@
#ifndef EDITFLOATREGISTER_H
#define EDITFLOATREGISTER_H
#include <QDialog>
#include <QLineEdit>
#include <HexValidator.h>
#include "LongLongValidator.h"
#include <QDoubleValidator>
namespace Ui {
class EditFloatRegister;
}
class EditFloatRegister : public QDialog
{
Q_OBJECT
public:
explicit EditFloatRegister(int RegisterSize, QWidget *parent = 0);
void loadData(char* RegisterData);
const char* getData();
~EditFloatRegister();
private slots:
void editingModeChangedSlot(bool arg);
void editingHex1FinishedSlot(QString arg);
void editingHex2FinishedSlot(QString arg);
// the compiler does not allow us to use template as slot. So we are going to waste the screen space...
void editingLowerShort0FinishedSlot(QString arg);
void editingLowerShort1FinishedSlot(QString arg);
void editingLowerShort2FinishedSlot(QString arg);
void editingLowerShort3FinishedSlot(QString arg);
void editingLowerShort4FinishedSlot(QString arg);
void editingLowerShort5FinishedSlot(QString arg);
void editingLowerShort6FinishedSlot(QString arg);
void editingLowerShort7FinishedSlot(QString arg);
void editingUpperShort0FinishedSlot(QString arg);
void editingUpperShort1FinishedSlot(QString arg);
void editingUpperShort2FinishedSlot(QString arg);
void editingUpperShort3FinishedSlot(QString arg);
void editingUpperShort4FinishedSlot(QString arg);
void editingUpperShort5FinishedSlot(QString arg);
void editingUpperShort6FinishedSlot(QString arg);
void editingUpperShort7FinishedSlot(QString arg);
void editingLowerLong0FinishedSlot(QString arg);
void editingLowerLong1FinishedSlot(QString arg);
void editingLowerLong2FinishedSlot(QString arg);
void editingLowerLong3FinishedSlot(QString arg);
void editingUpperLong0FinishedSlot(QString arg);
void editingUpperLong1FinishedSlot(QString arg);
void editingUpperLong2FinishedSlot(QString arg);
void editingUpperLong3FinishedSlot(QString arg);
void editingLowerFloat0FinishedSlot(QString arg);
void editingLowerFloat1FinishedSlot(QString arg);
void editingLowerFloat2FinishedSlot(QString arg);
void editingLowerFloat3FinishedSlot(QString arg);
void editingUpperFloat0FinishedSlot(QString arg);
void editingUpperFloat1FinishedSlot(QString arg);
void editingUpperFloat2FinishedSlot(QString arg);
void editingUpperFloat3FinishedSlot(QString arg);
void editingLowerDouble0FinishedSlot(QString arg);
void editingLowerDouble1FinishedSlot(QString arg);
void editingUpperDouble0FinishedSlot(QString arg);
void editingUpperDouble1FinishedSlot(QString arg);
void editingLowerLongLong0FinishedSlot(QString arg);
void editingLowerLongLong1FinishedSlot(QString arg);
void editingUpperLongLong0FinishedSlot(QString arg);
void editingUpperLongLong1FinishedSlot(QString arg);
private:
HexValidator hexValidate;
LongLongValidator signedShortValidator;
LongLongValidator unsignedShortValidator;
LongLongValidator signedLongValidator;
LongLongValidator unsignedLongValidator;
LongLongValidator signedLongLongValidator;
LongLongValidator unsignedLongLongValidator;
QDoubleValidator doubleValidator;
void hideUpperPart();
void reloadDataLow();
void reloadDataHigh();
void reloadShortData(QLineEdit& txtbox, char* Data);
void reloadLongData(QLineEdit& txtbox, char* Data);
void reloadFloatData(QLineEdit& txtbox, char* Data);
void reloadDoubleData(QLineEdit& txtbox, char* Data);
void reloadLongLongData(QLineEdit& txtbox, char* Data);
void editingShortFinishedSlot(size_t offset, QString arg);
void editingLongFinishedSlot(size_t offset, QString arg);
void editingFloatFinishedSlot(size_t offset, QString arg);
void editingDoubleFinishedSlot(size_t offset, QString arg);
void editingLongLongFinishedSlot(size_t offset, QString arg);
Ui::EditFloatRegister *ui;
QObject* mutex;
char Data[64];
int RegSize;
};
#endif // EDITFLOATREGISTER_H
#ifndef EDITFLOATREGISTER_H
#define EDITFLOATREGISTER_H
#include <QDialog>
#include <QLineEdit>
#include <HexValidator.h>
#include "LongLongValidator.h"
#include <QDoubleValidator>
namespace Ui
{
class EditFloatRegister;
}
class EditFloatRegister : public QDialog
{
Q_OBJECT
public:
explicit EditFloatRegister(int RegisterSize, QWidget* parent = 0);
void loadData(char* RegisterData);
const char* getData();
~EditFloatRegister();
private slots:
void editingModeChangedSlot(bool arg);
void editingHex1FinishedSlot(QString arg);
void editingHex2FinishedSlot(QString arg);
// the compiler does not allow us to use template as slot. So we are going to waste the screen space...
void editingLowerShort0FinishedSlot(QString arg);
void editingLowerShort1FinishedSlot(QString arg);
void editingLowerShort2FinishedSlot(QString arg);
void editingLowerShort3FinishedSlot(QString arg);
void editingLowerShort4FinishedSlot(QString arg);
void editingLowerShort5FinishedSlot(QString arg);
void editingLowerShort6FinishedSlot(QString arg);
void editingLowerShort7FinishedSlot(QString arg);
void editingUpperShort0FinishedSlot(QString arg);
void editingUpperShort1FinishedSlot(QString arg);
void editingUpperShort2FinishedSlot(QString arg);
void editingUpperShort3FinishedSlot(QString arg);
void editingUpperShort4FinishedSlot(QString arg);
void editingUpperShort5FinishedSlot(QString arg);
void editingUpperShort6FinishedSlot(QString arg);
void editingUpperShort7FinishedSlot(QString arg);
void editingLowerLong0FinishedSlot(QString arg);
void editingLowerLong1FinishedSlot(QString arg);
void editingLowerLong2FinishedSlot(QString arg);
void editingLowerLong3FinishedSlot(QString arg);
void editingUpperLong0FinishedSlot(QString arg);
void editingUpperLong1FinishedSlot(QString arg);
void editingUpperLong2FinishedSlot(QString arg);
void editingUpperLong3FinishedSlot(QString arg);
void editingLowerFloat0FinishedSlot(QString arg);
void editingLowerFloat1FinishedSlot(QString arg);
void editingLowerFloat2FinishedSlot(QString arg);
void editingLowerFloat3FinishedSlot(QString arg);
void editingUpperFloat0FinishedSlot(QString arg);
void editingUpperFloat1FinishedSlot(QString arg);
void editingUpperFloat2FinishedSlot(QString arg);
void editingUpperFloat3FinishedSlot(QString arg);
void editingLowerDouble0FinishedSlot(QString arg);
void editingLowerDouble1FinishedSlot(QString arg);
void editingUpperDouble0FinishedSlot(QString arg);
void editingUpperDouble1FinishedSlot(QString arg);
void editingLowerLongLong0FinishedSlot(QString arg);
void editingLowerLongLong1FinishedSlot(QString arg);
void editingUpperLongLong0FinishedSlot(QString arg);
void editingUpperLongLong1FinishedSlot(QString arg);
private:
HexValidator hexValidate;
LongLongValidator signedShortValidator;
LongLongValidator unsignedShortValidator;
LongLongValidator signedLongValidator;
LongLongValidator unsignedLongValidator;
LongLongValidator signedLongLongValidator;
LongLongValidator unsignedLongLongValidator;
QDoubleValidator doubleValidator;
void hideUpperPart();
void reloadDataLow();
void reloadDataHigh();
void reloadShortData(QLineEdit & txtbox, char* Data);
void reloadLongData(QLineEdit & txtbox, char* Data);
void reloadFloatData(QLineEdit & txtbox, char* Data);
void reloadDoubleData(QLineEdit & txtbox, char* Data);
void reloadLongLongData(QLineEdit & txtbox, char* Data);
void editingShortFinishedSlot(size_t offset, QString arg);
void editingLongFinishedSlot(size_t offset, QString arg);
void editingFloatFinishedSlot(size_t offset, QString arg);
void editingDoubleFinishedSlot(size_t offset, QString arg);
void editingLongLongFinishedSlot(size_t offset, QString arg);
Ui::EditFloatRegister* ui;
QObject* mutex;
char Data[64];
int RegSize;
};
#endif // EDITFLOATREGISTER_H

View File

@ -6,9 +6,7 @@ EntropyDialog::EntropyDialog(QWidget* parent) :
ui(new Ui::EntropyDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
mBlockSize = 128;

View File

@ -8,9 +8,7 @@ ExceptionRangeDialog::ExceptionRangeDialog(QWidget* parent) :
ui->setupUi(this);
//set window flags
setModal(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
ui->editStart->setCursorPosition(0);
ui->editEnd->setCursorPosition(0);

View File

@ -9,9 +9,8 @@ GotoDialog::GotoDialog(QWidget* parent, bool allowInvalidExpression)
//setup UI first
ui->setupUi(this);
setModal(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
//initialize stuff
if(!DbgIsDebugging()) //not debugging
ui->labelError->setText(tr("<font color='red'><b>Not debugging...</b></font>"));

View File

@ -6,9 +6,7 @@
HexEditDialog::HexEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::HexEditDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(true); //modal window

View File

@ -5,9 +5,7 @@ LineEditDialog::LineEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Li
{
ui->setupUi(this);
setModal(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(true); //modal window
ui->checkBox->hide();

View File

@ -13,6 +13,7 @@
#include "AttachDialog.h"
#include "LineEditDialog.h"
#include "StringUtil.h"
#include "MiscUtil.h"
QString MainWindow::windowTitle = "";
@ -63,9 +64,7 @@ MainWindow::MainWindow(QWidget* parent)
setWindowTitle(QString(mWindowMainTitle));
// Load application icon
HICON hIcon = LoadIcon(GetModuleHandleW(0), MAKEINTRESOURCE(100));
SendMessageW((HWND)MainWindow::winId(), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
DestroyIcon(hIcon);
SetApplicationIcon(MainWindow::winId());
// Load recent files
loadMRUList(16);

View File

@ -6,9 +6,7 @@ PageMemoryRights::PageMemoryRights(QWidget* parent) : QDialog(parent), ui(new Ui
{
ui->setupUi(this);
//set window flags
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setModal(true);
addr = 0;
size = 0;

View File

@ -10,9 +10,7 @@ PatchDialog::PatchDialog(QWidget* parent) :
ui(new Ui::PatchDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(false); //non-modal window

View File

@ -6,9 +6,7 @@ PatchDialogGroupSelector::PatchDialogGroupSelector(QWidget* parent) :
ui(new Ui::PatchDialogGroupSelector)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(false); //non-modal window

View File

@ -6,9 +6,7 @@ SelectFields::SelectFields(QWidget* parent) :
ui(new Ui::SelectFields)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setModal(true);
}

View File

@ -11,9 +11,7 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
{
ui->setupUi(this);
//set window flags
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(true);
LoadSettings(); //load settings from file

View File

@ -5,9 +5,7 @@ ShortcutsDialog::ShortcutsDialog(QWidget* parent) : QDialog(parent), ui(new Ui::
{
ui->setupUi(this);
//set window flags
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setModal(true);

View File

@ -9,9 +9,7 @@ WordEditDialog::WordEditDialog(QWidget* parent)
mUnsignedEditPos(0)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setModal(true);
// Set up default validators for numerical input

View File

@ -11,9 +11,7 @@ YaraRuleSelectionDialog::YaraRuleSelectionDialog(QWidget* parent, const QString
ui(new Ui::YaraRuleSelectionDialog)
{
ui->setupUi(this);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
#endif
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setWindowTitle(title);

View File

@ -1,7 +1,7 @@
#include "HexValidator.h"
#include <QObject>
HexValidator::HexValidator(QObject *parent) : QValidator(parent)
HexValidator::HexValidator(QObject* parent) : QValidator(parent)
{
}
@ -9,7 +9,7 @@ HexValidator::~HexValidator()
{
}
void HexValidator::fixup(QString& input) const
void HexValidator::fixup(QString & input) const
{
for(auto i : input)
{
@ -23,7 +23,7 @@ void HexValidator::fixup(QString& input) const
}
}
QValidator::State HexValidator::validate(QString& input, int& pos) const
QValidator::State HexValidator::validate(QString & input, int & pos) const
{
input = input.toUpper();
for(int i = 0; i < input.length(); i++)

View File

@ -9,8 +9,8 @@ public:
explicit HexValidator(QObject* parent = 0);
~HexValidator();
void fixup(QString& input) const;
State validate(QString& input, int& pos) const;
void fixup(QString & input) const;
State validate(QString & input, int & pos) const;
};
#endif // HEXVALIDATOR_H

View File

@ -1,6 +1,6 @@
#include "LongLongValidator.h"
LongLongValidator::LongLongValidator(DataType t, QObject *parent) : QValidator(parent), dt(t)
LongLongValidator::LongLongValidator(DataType t, QObject* parent) : QValidator(parent), dt(t)
{
}
@ -8,13 +8,14 @@ LongLongValidator::~LongLongValidator()
{
}
void LongLongValidator::fixup(QString& input) const
void LongLongValidator::fixup(QString & input) const
{
Q_UNUSED(input);
}
QValidator::State LongLongValidator::validate(QString& input, int& pos) const
QValidator::State LongLongValidator::validate(QString & input, int & pos) const
{
Q_UNUSED(pos);
bool ok = false;
if(input.isEmpty()) return State::Acceptable;
switch(dt)
@ -65,7 +66,7 @@ QValidator::State LongLongValidator::validate(QString& input, int& pos) const
{
if(input == QString('-'))
return State::Acceptable;
if(input.toULongLong(&ok) > 2147483647)
if(input.toULongLong(&ok) > 2147483647LL)
{
if(ok)
{
@ -73,7 +74,7 @@ QValidator::State LongLongValidator::validate(QString& input, int& pos) const
return State::Acceptable;
}
}
else if(input.toLongLong(&ok) < -2147483648)
else if(input.toLongLong(&ok) < -2147483648LL)
{
if(ok)
{

View File

@ -20,8 +20,8 @@ public:
explicit LongLongValidator(DataType t, QObject* parent = 0);
~LongLongValidator();
void fixup(QString& input) const;
State validate(QString& input, int& pos) const;
void fixup(QString & input) const;
State validate(QString & input, int & pos) const;
private:
DataType dt;
};

View File

@ -0,0 +1,9 @@
#include "MiscUtil.h"
#include <windows.h>
void SetApplicationIcon(WId winId)
{
HICON hIcon = LoadIcon(GetModuleHandleW(0), MAKEINTRESOURCE(100));
SendMessageW((HWND)winId, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
DestroyIcon(hIcon);
}

View File

@ -0,0 +1,8 @@
#ifndef MISCUTIL_H
#define MISCUTIL_H
#include <QWidget>
void SetApplicationIcon(WId winId);
#endif // MISCUTIL_H

View File

@ -149,7 +149,8 @@ SOURCES += \
Src/Gui/HandlesView.cpp \
Src/Gui/EditFloatRegister.cpp \
Src/Utils/HexValidator.cpp \
Src/Utils/LongLongValidator.cpp
Src/Utils/LongLongValidator.cpp \
Src/Utils/MiscUtil.cpp
HEADERS += \
@ -239,7 +240,8 @@ HEADERS += \
Src/Gui/HandlesView.h \
Src/Gui/EditFloatRegister.h \
Src/Utils/HexValidator.h \
Src/Utils/LongLongValidator.h
Src/Utils/LongLongValidator.h \
Src/Utils/MiscUtil.h
FORMS += \
Src/Gui/MainWindow.ui \