forked from qt-creator/qt-creator
ClangCodeModel, Puppet, CrashHandler: Compile with Qt6
Task-number: QTCREATORBUG-24098 Change-Id: Ic65e7a5dce0a512f48fb70915b9443ef7df2b787 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -26,8 +26,10 @@
|
|||||||
#include "valueschangedcommand.h"
|
#include "valueschangedcommand.h"
|
||||||
|
|
||||||
#include "sharedmemory.h"
|
#include "sharedmemory.h"
|
||||||
|
|
||||||
#include <QCache>
|
#include <QCache>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QIODevice>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
@@ -469,7 +469,7 @@ bool CompleteCommand::run()
|
|||||||
auto *processor = ClangEditorDocumentProcessor::get(documentFilePath);
|
auto *processor = ClangEditorDocumentProcessor::get(documentFilePath);
|
||||||
QTC_ASSERT(processor, return false);
|
QTC_ASSERT(processor, return false);
|
||||||
|
|
||||||
return completionResults(editor, QStringList(), timeOutInMs());
|
return !completionResults(editor, QStringList(), timeOutInMs()).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
Command::Ptr CompleteCommand::parse(BatchFileLineTokenizer &arguments,
|
Command::Ptr CompleteCommand::parse(BatchFileLineTokenizer &arguments,
|
||||||
|
@@ -63,7 +63,7 @@ BacktraceCollector::~BacktraceCollector()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BacktraceCollector::run(Q_PID pid)
|
void BacktraceCollector::run(qint64 pid)
|
||||||
{
|
{
|
||||||
d->debugger.start(QLatin1String("gdb"), QStringList({
|
d->debugger.start(QLatin1String("gdb"), QStringList({
|
||||||
"--nw", // Do not use a window interface.
|
"--nw", // Do not use a window interface.
|
||||||
|
@@ -36,7 +36,7 @@ public:
|
|||||||
explicit BacktraceCollector(QObject *parent = 0);
|
explicit BacktraceCollector(QObject *parent = 0);
|
||||||
~BacktraceCollector();
|
~BacktraceCollector();
|
||||||
|
|
||||||
void run(Q_PID pid);
|
void run(qint64 pid);
|
||||||
bool isRunning() const;
|
bool isRunning() const;
|
||||||
void kill();
|
void kill();
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ static void printErrorAndExit()
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool hasProcessOriginFromQtCreatorBuildDir(Q_PID pid)
|
static bool hasProcessOriginFromQtCreatorBuildDir(qint64 pid)
|
||||||
{
|
{
|
||||||
const QString executable = QFile::symLinkTarget(QString::fromLatin1("/proc/%1/exe")
|
const QString executable = QFile::symLinkTarget(QString::fromLatin1("/proc/%1/exe")
|
||||||
.arg(QString::number(pid)));
|
.arg(QString::number(pid)));
|
||||||
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
if (positionalArguments.size() != 2)
|
if (positionalArguments.size() != 2)
|
||||||
printErrorAndExit();
|
printErrorAndExit();
|
||||||
|
|
||||||
Q_PID parentPid = getppid();
|
qint64 parentPid = getppid();
|
||||||
if (!hasProcessOriginFromQtCreatorBuildDir(parentPid))
|
if (!hasProcessOriginFromQtCreatorBuildDir(parentPid))
|
||||||
printErrorAndExit();
|
printErrorAndExit();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user