2 Star 2 Fork 1

xinhecuican/QSmartAssistant

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.cpp 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
xinhecuican 提交于 2024-08-04 10:25 . fix: test bug fix
#include "robot.h"
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#ifdef TEST
#include "Test/tst_sherpa.h"
#include <QTest>
QTEST_GUILESS_MAIN(tst_sherpa);
#else
#ifdef BREAKPAD
#include "client/linux/handler/exception_handler.h"
#include "Utils/config.h"
static bool dumpCallback(const google_breakpad::MinidumpDescriptor &descriptor,
void *context, bool succeeded) {
qInfo() << "Dump path:" << descriptor.path();
return succeeded;
}
#endif
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
// 设置PWD
QString applicationDirPathStr = QCoreApplication::applicationDirPath();
QDir::setCurrent(applicationDirPathStr);
#ifdef BREAKPAD
google_breakpad::MinidumpDescriptor descriptor(
Config::getDataPath("Tmp").toStdString()); // minidump文件写入到的目录
google_breakpad::ExceptionHandler eh(descriptor, NULL, dumpCallback, NULL,
true, -1);
#endif
QCoreApplication::addLibraryPath(QDir::homePath() +
"/.config/QSmartAssistant/plugins/lib");
Robot *robot = new Robot(&a);
robot->start();
a.connect(&a, &QCoreApplication::aboutToQuit, &a, [=]() {
qDebug() << "stop";
robot->stop();
});
return a.exec();
}
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/xinhecuican/QSmartAssistant.git
[email protected]:xinhecuican/QSmartAssistant.git
xinhecuican
QSmartAssistant
QSmartAssistant
master

搜索帮助