Upgrade to Qt5
This commit is contained in:
parent
51e5b1e09f
commit
9c0f46d029
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,8 +3,8 @@ cmake_minimum_required (VERSION 3.0.2)
|
||||||
project(RpcView)
|
project(RpcView)
|
||||||
|
|
||||||
set(RPCVIEW_VERSION_MAJOR 0)
|
set(RPCVIEW_VERSION_MAJOR 0)
|
||||||
set(RPCVIEW_VERSION_MINOR 2)
|
set(RPCVIEW_VERSION_MINOR 3)
|
||||||
set(RPCVIEW_VERSION_RELEASE 2)
|
set(RPCVIEW_VERSION_RELEASE 0)
|
||||||
|
|
||||||
# configure a header file to pass some of the CMake settings to the source code
|
# configure a header file to pass some of the CMake settings to the source code
|
||||||
configure_file (
|
configure_file (
|
||||||
|
|
61
Qt/Qt.h
61
Qt/Qt.h
|
@ -3,45 +3,46 @@
|
||||||
|
|
||||||
#define QT_BUILD_CONFIGURE
|
#define QT_BUILD_CONFIGURE
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <QtGui/QSortFilterProxyModel>
|
#include <QtCore/QSortFilterProxyModel>
|
||||||
#include <QtGui/QStandardItemModel>
|
#include <QtGui/QStandardItemModel>
|
||||||
#include <QtGui/QDockWidget>
|
#include <QtWidgets/QDockWidget>
|
||||||
#include <QtGui/QLabel>
|
#include <QtWidgets/QLabel>
|
||||||
#include <QtGui/QTreeView>
|
#include <QtWidgets/QTreeView>
|
||||||
#include <QtGui/QGridLayout>
|
#include <QtWidgets/QGridLayout>
|
||||||
#include <QtGui/QGroupBox>
|
#include <QtWidgets/QGroupBox>
|
||||||
#include <QtGui/QDockWidget>
|
#include <QtWidgets/QDockWidget>
|
||||||
#include <QtGui/QTextEdit>
|
#include <QtWidgets/QTextEdit>
|
||||||
#include <QtGui/QLineEdit>
|
#include <QtWidgets/QLineEdit>
|
||||||
#include <QtGui/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtGui/QFormLayout>
|
#include <QtWidgets/QFormLayout>
|
||||||
#include <QtGui/QAbstractItemView>
|
#include <QtWidgets/QAbstractItemView>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtGui/QMainWindow>
|
#include <QtWidgets/QMainWindow>
|
||||||
#include <QtGui/QStatusBar>
|
#include <QtWidgets/QStatusBar>
|
||||||
#include <QtGui/QAction>
|
#include <QtWidgets/QAction>
|
||||||
#include <QtGui/QActionGroup>
|
#include <QtWidgets/QActionGroup>
|
||||||
#include <QtGui/QMenu>
|
#include <QtWidgets/QMenu>
|
||||||
#include <QtGui/QMenuBar>
|
#include <QtWidgets/QMenuBar>
|
||||||
#include <QtGui/QPixmap>
|
#include <QtGui/QPixmap>
|
||||||
#include <QtGui/QTreeWidgetItem>
|
#include <QtWidgets/QTreeWidgetItem>
|
||||||
#include <QtGui/QTreeWidget>
|
#include <QtWidgets/QTreeWidget>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QProcess>
|
#include <QtCore/QProcess>
|
||||||
#include <QtGui/QSplashScreen>
|
#include <QtWidgets/QSplashScreen>
|
||||||
#include <QtGui/QHeaderView>
|
#include <QtWidgets/QHeaderView>
|
||||||
#include <QtGui/QSyntaxHighlighter>
|
#include <QtGui/QSyntaxHighlighter>
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtCore/QThread>
|
#include <QtCore/QThread>
|
||||||
#include <QtGui/QColorDialog>
|
#include <QtWidgets/QColorDialog>
|
||||||
#include <QtGui/QInputDialog>
|
#include <QtWidgets/QInputDialog>
|
||||||
#include <QtGui/QCheckBox>
|
#include <QtWidgets/QCheckBox>
|
||||||
#include <QtGui/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
#include <QtGui/QStackedWidget>
|
#include <QtWidgets/QStackedWidget>
|
||||||
#include <QtGui/QKeyEvent>
|
#include <QtGui/QKeyEvent>
|
||||||
#include <QtGui/QToolButton>
|
#include <QtWidgets/QToolButton>
|
||||||
#include <QtGui/QDialogButtonBox>
|
#include <QtWidgets/QDialogButtonBox>
|
||||||
#include <QtCore/QSignalMapper>
|
#include <QtCore/QSignalMapper>
|
||||||
|
#include <QtWinExtras/qwinfunctions.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -10,8 +10,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
# Find the QtWidgets library
|
# Find the QtWidgets library
|
||||||
# set CMAKE_PREFIX_PATH=c:\Qt\4.8.6
|
# set CMAKE_PREFIX_PATH=C:\Qt\Qt5.9.1\5.9.1\msvc2015 or c:\Qt\Qt5.9.1\5.9.1\msvc2015_64
|
||||||
find_package(Qt4 REQUIRED QtGui QtCore)
|
find_package(Qt5Widgets)
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
RpcView
|
RpcView
|
||||||
|
@ -43,12 +43,4 @@ add_executable(
|
||||||
RpcViewResource.rc
|
RpcViewResource.rc
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${CMAKE_GENERATOR} MATCHES "Win64")
|
target_link_libraries(RpcView Qt5::Widgets $ENV{CMAKE_PREFIX_PATH}/lib/Qt5WinExtras.lib)
|
||||||
message(STATUS "Target is 64 bits")
|
|
||||||
target_link_libraries(RpcView ../../../Qt/lib/x64/QtGui ../../../Qt/lib/x64/QtCore)
|
|
||||||
target_link_libraries(RpcView Qt4::QtGui Qt4::QtCore)
|
|
||||||
else(${CMAKE_GENERATOR} MATCHES "Win64")
|
|
||||||
message(STATUS "Target is 32 bits")
|
|
||||||
target_link_libraries(RpcView ../../../Qt/lib/x86/QtGui ../../../Qt/lib/x86/QtCore)
|
|
||||||
target_link_libraries(RpcView Qt4::QtGui Qt4::QtCore)
|
|
||||||
endif(${CMAKE_GENERATOR} MATCHES "Win64")
|
|
|
@ -10,10 +10,10 @@ void DecompilationWidget_C::InsertText(const char* Txt)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
pTextEdit->moveCursor(QTextCursor::End);
|
pTextEdit->moveCursor(QTextCursor::End);
|
||||||
pTextEdit->append( QString::fromAscii(Txt) );
|
pTextEdit->append( QString::fromLatin1(Txt) );
|
||||||
pTextEdit->ensureCursorVisible();
|
pTextEdit->ensureCursorVisible();
|
||||||
*/
|
*/
|
||||||
pTextEdit->setText( QString::fromAscii(Txt) );
|
pTextEdit->setText( QString::fromLatin1(Txt) );
|
||||||
pTextEdit->ensureCursorVisible();
|
pTextEdit->ensureCursorVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ bool InterfacesWidget_C::IsInterfacePresent(quint32 Pid, RPC_IF_ID* pIfId)
|
||||||
|
|
||||||
if ( UuidToStringA(&pIfId->Uuid,&pUuidString)!=RPC_S_OK ) goto End;
|
if ( UuidToStringA(&pIfId->Uuid,&pUuidString)!=RPC_S_OK ) goto End;
|
||||||
|
|
||||||
ItemList = pModel->findItems(QString::fromAscii((const char*)pUuidString), Qt::MatchFixedString, Column_Uuid);
|
ItemList = pModel->findItems(QString::fromLatin1((const char*)pUuidString), Qt::MatchFixedString, Column_Uuid);
|
||||||
if (ItemList.isEmpty()) goto End;
|
if (ItemList.isEmpty()) goto End;
|
||||||
|
|
||||||
for (auto Iter=ItemList.begin();Iter!=ItemList.end();Iter++)
|
for (auto Iter=ItemList.begin();Iter!=ItemList.end();Iter++)
|
||||||
|
@ -324,7 +324,7 @@ bool InterfacesWidget_C::AddInterfaces(RpcInterfaceInfo_T* pRpcInterfaceInfo)
|
||||||
if (pRpcInterfaceInfo->LocationState & MEM_FREE) SetRowColor(Index, QColor(200, 200, 200, 180));
|
if (pRpcInterfaceInfo->LocationState & MEM_FREE) SetRowColor(Index, QColor(200, 200, 200, 180));
|
||||||
|
|
||||||
if (!memcmp(&pRpcInterfaceInfo->TransfertSyntax,&DceRpcSyntaxUuid,sizeof(DceRpcSyntaxUuid)))
|
if (!memcmp(&pRpcInterfaceInfo->TransfertSyntax,&DceRpcSyntaxUuid,sizeof(DceRpcSyntaxUuid)))
|
||||||
pModel->setData(pModel->index(Index, Column_TransfertSyntax), QString::fromAscii("DCE"));
|
pModel->setData(pModel->index(Index, Column_TransfertSyntax), QString::fromLatin1("DCE"));
|
||||||
else if (!memcmp(&pRpcInterfaceInfo->TransfertSyntax,&Ndr64SyntaxUuid,sizeof(Ndr64SyntaxUuid)))
|
else if (!memcmp(&pRpcInterfaceInfo->TransfertSyntax,&Ndr64SyntaxUuid,sizeof(Ndr64SyntaxUuid)))
|
||||||
pModel->setData(pModel->index(Index, Column_TransfertSyntax), QString::fromUtf16((const ushort*)L"NDR64"));
|
pModel->setData(pModel->index(Index, Column_TransfertSyntax), QString::fromUtf16((const ushort*)L"NDR64"));
|
||||||
else
|
else
|
||||||
|
|
|
@ -447,7 +447,7 @@ void MainWindow_C::ConfigureSymbols()
|
||||||
if ( bOk )
|
if ( bOk )
|
||||||
{
|
{
|
||||||
pSettings->setValue("SymbolsPath",NewSymbolsPath);
|
pSettings->setValue("SymbolsPath",NewSymbolsPath);
|
||||||
SetEnvironmentVariableA("RpcViewSymbolPath",NewSymbolsPath.toAscii());
|
SetEnvironmentVariableA("RpcViewSymbolPath",NewSymbolsPath.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ void MainWindow_C::SetupMenu()
|
||||||
hUacIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_UAC_ICON));
|
hUacIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_UAC_ICON));
|
||||||
if (hUacIcon!=NULL)
|
if (hUacIcon!=NULL)
|
||||||
{
|
{
|
||||||
pActionAllProcessesDetails->setIcon(QPixmap::fromWinHICON(hUacIcon));
|
pActionAllProcessesDetails->setIcon(QtWin::fromHICON(hUacIcon));
|
||||||
DestroyIcon(hUacIcon);
|
DestroyIcon(hUacIcon);
|
||||||
}
|
}
|
||||||
setMenuBar(pMenuBar);
|
setMenuBar(pMenuBar);
|
||||||
|
@ -733,7 +733,7 @@ MainWindow_C::MainWindow_C(RpcCore_T* pRpcCore)
|
||||||
|
|
||||||
QFont font("Helvetica", 20, QFont::Bold);
|
QFont font("Helvetica", 20, QFont::Bold);
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
QSplashScreen SplashScreen(QPixmap::fromWinHICON((HICON)hIcon),Qt::WindowStaysOnTopHint);
|
QSplashScreen SplashScreen(QtWin::fromHICON((HICON)hIcon),Qt::WindowStaysOnTopHint);
|
||||||
SplashScreen.showMessage(QString("RpcView"), Qt::AlignCenter, QColor(Qt::lightGray));
|
SplashScreen.showMessage(QString("RpcView"), Qt::AlignCenter, QColor(Qt::lightGray));
|
||||||
SplashScreen.setFont(font);
|
SplashScreen.setFont(font);
|
||||||
SplashScreen.show();
|
SplashScreen.show();
|
||||||
|
|
|
@ -122,7 +122,7 @@ void ProcessInfoWidget_C::UpdateProcessInfo(RpcProcessInfo_T* pRpcProcessInfo)
|
||||||
|
|
||||||
if (pRpcProcessInfo->hIcon!=NULL)
|
if (pRpcProcessInfo->hIcon!=NULL)
|
||||||
{
|
{
|
||||||
pIconLabel->setPixmap( QPixmap::fromWinHICON( pRpcProcessInfo->hIcon ) );
|
pIconLabel->setPixmap( QtWin::fromHICON( pRpcProcessInfo->hIcon ) );
|
||||||
pIconLabel->show();
|
pIconLabel->show();
|
||||||
DestroyIcon( pRpcProcessInfo->hIcon );
|
DestroyIcon( pRpcProcessInfo->hIcon );
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ bool ProcessWidget_C::AddProcess(RpcProcessInfo_T* pRpcProcessInfo)
|
||||||
|
|
||||||
if ( pRpcProcessInfo->hIcon!=NULL )
|
if ( pRpcProcessInfo->hIcon!=NULL )
|
||||||
{
|
{
|
||||||
AddProcessItem(pProcess,Index,Column_Name, Qt::DecorationRole, QIcon( QPixmap::fromWinHICON( pRpcProcessInfo->hIcon ) ) );
|
AddProcessItem(pProcess,Index,Column_Name, Qt::DecorationRole, QIcon( QtWin::fromHICON( pRpcProcessInfo->hIcon ) ) );
|
||||||
DestroyIcon( pRpcProcessInfo->hIcon );
|
DestroyIcon( pRpcProcessInfo->hIcon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ End:
|
||||||
hMainIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_MAIN_ICON));
|
hMainIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_MAIN_ICON));
|
||||||
if (hMainIcon!=NULL)
|
if (hMainIcon!=NULL)
|
||||||
{
|
{
|
||||||
pMainWindow->setWindowIcon(QPixmap::fromWinHICON(hMainIcon));
|
pMainWindow->setWindowIcon(QtWin::fromHICON(hMainIcon));
|
||||||
DestroyIcon(hMainIcon);
|
DestroyIcon(hMainIcon);
|
||||||
}
|
}
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
Loading…
Reference in New Issue