diff --git a/LinkScope.pro b/LinkScope.pro index 3fddc238f4d6db33801e792e2fd420f7a14496f2..2f7cfd716060203ceb8a8c709b69fa8a7a171b4b 100644 --- a/LinkScope.pro +++ b/LinkScope.pro @@ -6,6 +6,10 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 +*-msvc* { + QMAKE_CXXFLAGS += /utf-8 +} + # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the diff --git a/gdbprocess.cpp b/gdbprocess.cpp index d51066a8d94680f5177ec73464b02389c0ba74bf..e8b6af68680337fde5f8320e4c6655892c618bd2 100644 --- a/gdbprocess.cpp +++ b/gdbprocess.cpp @@ -1,4 +1,5 @@ #include "gdbprocess.h" +#include GDBProcess::GDBProcess(QObject *parent) : QObject(parent) { @@ -30,6 +31,12 @@ void GDBProcess::start() process->setWorkingDirectory(QCoreApplication::applicationDirPath()+"/gdb");//设置工作路径 process->setNativeArguments("-q");//设置gdb在安静模式下打开 process->start();//QProcess::Unbuffered|QProcess::ReadWrite); + if(!process->waitForStarted()) { + QMessageBox::critical(nullptr, + "无法启动GDB", + QString("GDB程序“%1”无法启动,Linkscope即将退出。").arg(process->program())); + exit(1); + } runCmd("set confirm off\r\n");//设置不要手动确认 runCmd("set print pretty on\r\n");//设置结构体规范打印 } diff --git a/qss/light-blue.qss b/qss/light-blue.qss index cdd5ddfe1942a6a63b2d7128d3d82b69d0f4a959..a35db1095eba262aca0cda9096a9341ac0e523dd 100644 --- a/qss/light-blue.qss +++ b/qss/light-blue.qss @@ -179,3 +179,8 @@ QTreeView::branch:has-siblings:adjoins-item{ QTreeView::branch:!has-children:!has-siblings:adjoins-item{ image: url(:/qss/qss-img/light-blue-tree-end.png); } + +/* 为解决ComboBox下拉栏过小,调试器、芯片名称出现省略号 */ +QComboBox QAbstractItemView { + min-width: 300px; +}