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)
|
||||
|
||||
set(RPCVIEW_VERSION_MAJOR 0)
|
||||
set(RPCVIEW_VERSION_MINOR 2)
|
||||
set(RPCVIEW_VERSION_RELEASE 2)
|
||||
set(RPCVIEW_VERSION_MINOR 3)
|
||||
set(RPCVIEW_VERSION_RELEASE 0)
|
||||
|
||||
# configure a header file to pass some of the CMake settings to the source code
|
||||
configure_file (
|
||||
|
|
61
Qt/Qt.h
61
Qt/Qt.h
|
@ -3,45 +3,46 @@
|
|||
|
||||
#define QT_BUILD_CONFIGURE
|
||||
#define NOMINMAX
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
#include <QtCore/QSortFilterProxyModel>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
#include <QtGui/QDockWidget>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QTreeView>
|
||||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QGroupBox>
|
||||
#include <QtGui/QDockWidget>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QFormLayout>
|
||||
#include <QtGui/QAbstractItemView>
|
||||
#include <QtWidgets/QDockWidget>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QTreeView>
|
||||
#include <QtWidgets/QGridLayout>
|
||||
#include <QtWidgets/QGroupBox>
|
||||
#include <QtWidgets/QDockWidget>
|
||||
#include <QtWidgets/QTextEdit>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QFormLayout>
|
||||
#include <QtWidgets/QAbstractItemView>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QStatusBar>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QActionGroup>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QMenuBar>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QStatusBar>
|
||||
#include <QtWidgets/QAction>
|
||||
#include <QtWidgets/QActionGroup>
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtWidgets/QMenuBar>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QTreeWidgetItem>
|
||||
#include <QtGui/QTreeWidget>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtWidgets/QTreeWidgetItem>
|
||||
#include <QtWidgets/QTreeWidget>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtGui/QSplashScreen>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtWidgets/QSplashScreen>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
#include <QtGui/QSyntaxHighlighter>
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtGui/QColorDialog>
|
||||
#include <QtGui/QInputDialog>
|
||||
#include <QtGui/QCheckBox>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QStackedWidget>
|
||||
#include <QtWidgets/QColorDialog>
|
||||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QStackedWidget>
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QDialogButtonBox>
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
#include <QtCore/QSignalMapper>
|
||||
#include <QtWinExtras/qwinfunctions.h>
|
||||
|
||||
#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)
|
||||
|
||||
# Find the QtWidgets library
|
||||
# set CMAKE_PREFIX_PATH=c:\Qt\4.8.6
|
||||
find_package(Qt4 REQUIRED QtGui QtCore)
|
||||
# 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(Qt5Widgets)
|
||||
|
||||
add_executable(
|
||||
RpcView
|
||||
|
@ -43,12 +43,4 @@ add_executable(
|
|||
RpcViewResource.rc
|
||||
)
|
||||
|
||||
if(${CMAKE_GENERATOR} MATCHES "Win64")
|
||||
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")
|
||||
target_link_libraries(RpcView Qt5::Widgets $ENV{CMAKE_PREFIX_PATH}/lib/Qt5WinExtras.lib)
|
|
@ -10,10 +10,10 @@ void DecompilationWidget_C::InsertText(const char* Txt)
|
|||
{
|
||||
/*
|
||||
pTextEdit->moveCursor(QTextCursor::End);
|
||||
pTextEdit->append( QString::fromAscii(Txt) );
|
||||
pTextEdit->append( QString::fromLatin1(Txt) );
|
||||
pTextEdit->ensureCursorVisible();
|
||||
*/
|
||||
pTextEdit->setText( QString::fromAscii(Txt) );
|
||||
pTextEdit->setText( QString::fromLatin1(Txt) );
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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 (!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)))
|
||||
pModel->setData(pModel->index(Index, Column_TransfertSyntax), QString::fromUtf16((const ushort*)L"NDR64"));
|
||||
else
|
||||
|
|
|
@ -447,7 +447,7 @@ void MainWindow_C::ConfigureSymbols()
|
|||
if ( bOk )
|
||||
{
|
||||
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));
|
||||
if (hUacIcon!=NULL)
|
||||
{
|
||||
pActionAllProcessesDetails->setIcon(QPixmap::fromWinHICON(hUacIcon));
|
||||
pActionAllProcessesDetails->setIcon(QtWin::fromHICON(hUacIcon));
|
||||
DestroyIcon(hUacIcon);
|
||||
}
|
||||
setMenuBar(pMenuBar);
|
||||
|
@ -733,7 +733,7 @@ MainWindow_C::MainWindow_C(RpcCore_T* pRpcCore)
|
|||
|
||||
QFont font("Helvetica", 20, QFont::Bold);
|
||||
#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.setFont(font);
|
||||
SplashScreen.show();
|
||||
|
|
|
@ -122,7 +122,7 @@ void ProcessInfoWidget_C::UpdateProcessInfo(RpcProcessInfo_T* pRpcProcessInfo)
|
|||
|
||||
if (pRpcProcessInfo->hIcon!=NULL)
|
||||
{
|
||||
pIconLabel->setPixmap( QPixmap::fromWinHICON( pRpcProcessInfo->hIcon ) );
|
||||
pIconLabel->setPixmap( QtWin::fromHICON( pRpcProcessInfo->hIcon ) );
|
||||
pIconLabel->show();
|
||||
DestroyIcon( pRpcProcessInfo->hIcon );
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ bool ProcessWidget_C::AddProcess(RpcProcessInfo_T* pRpcProcessInfo)
|
|||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ End:
|
|||
hMainIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_MAIN_ICON));
|
||||
if (hMainIcon!=NULL)
|
||||
{
|
||||
pMainWindow->setWindowIcon(QPixmap::fromWinHICON(hMainIcon));
|
||||
pMainWindow->setWindowIcon(QtWin::fromHICON(hMainIcon));
|
||||
DestroyIcon(hMainIcon);
|
||||
}
|
||||
return app.exec();
|
||||
|
|
Loading…
Reference in New Issue