forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5'
Change-Id: I2d78020f10aa66fdded63883030313e0c411ce02
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 52 KiB |
@@ -59,12 +59,11 @@
|
||||
|
||||
\li \l{http://www.gradle.org}{Gradle} for building application packages
|
||||
for Android devices (APK). Gradle is delivered with Qt 5.9, and
|
||||
later.
|
||||
later. Because Gradle scripts are not delivered with Android SDK
|
||||
Tools since version 26.0.0, they are delivered with Qt 5.9 and
|
||||
5.6.3.
|
||||
|
||||
\note Using Ant to build APKs is still possible when developing with
|
||||
Qt 5.8 or earlier together with Android SDK tools versions 25.2.5 or
|
||||
earlier, but Ant support has been deprecated since \QC 4.3 and will
|
||||
be removed in a future version.
|
||||
\note Using Ant to build APKs is no longer supported.
|
||||
|
||||
\li A tool chain for building applications for Android devices provided
|
||||
by the \l{http://developer.android.com/tools/sdk/ndk/index.html}
|
||||
@@ -151,21 +150,6 @@
|
||||
check box to allow \QC to create the kits for you. \QC displays a
|
||||
warning if it cannot find a suitable Qt version.
|
||||
|
||||
\li Select the tool to use for building application packages:
|
||||
|
||||
\list
|
||||
|
||||
\li To use Gradle, select the \uicontrol {Use Gradle instead of Ant}
|
||||
check box.
|
||||
|
||||
\li To use Ant, add the path to the Ant executable in the
|
||||
\uicontrol {Ant executable} field.
|
||||
|
||||
\note Ant support has been deprecated since \QC 4.3. We
|
||||
recommend that you use Gradle instead.
|
||||
|
||||
\endlist
|
||||
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} > \uicontrol Application >
|
||||
\uicontrol {Qt Quick Application} > \uicontrol Choose, and
|
||||
follow the instructions of the wizard. For more information, see
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
set up the development environment for the device platform and configure a
|
||||
connection between \QC and the mobile device.
|
||||
|
||||
To develop for Android devices, you must download and install
|
||||
the latest Android NDK and SDK, and update the SDK to get the API and tools
|
||||
needed for development. In addition, you must install the
|
||||
Java SE Development Kit (JDK) and Apache Ant. After you have installed all
|
||||
To develop for Android devices, you must download and install the latest
|
||||
Android NDK and SDK Tools, and then update or install the tools and packages
|
||||
needed for development. In addition, you must install the Java SE
|
||||
Development Kit (JDK). After you have installed all
|
||||
these tools, you must specify the paths to them in \QC.
|
||||
For detailed instructions, see \l{Qt for Android} and
|
||||
\l{Connecting Android Devices}.
|
||||
|
||||
@@ -93,6 +93,13 @@ Project {
|
||||
"androidrunner.h",
|
||||
"androidsdkmanager.cpp",
|
||||
"androidsdkmanager.h",
|
||||
"androidsdkmanagerwidget.cpp",
|
||||
"androidsdkmanagerwidget.h",
|
||||
"androidsdkmanagerwidget.ui",
|
||||
"androidsdkmodel.cpp",
|
||||
"androidsdkmodel.h",
|
||||
"androidsdkpackage.cpp",
|
||||
"androidsdkpackage.h",
|
||||
"androidsettingspage.cpp",
|
||||
"androidsettingspage.h",
|
||||
"androidsettingswidget.cpp",
|
||||
|
||||
@@ -764,6 +764,7 @@ void AndroidRunner::qmlServerPortReady(Port port)
|
||||
// host port n to target port n via adb.
|
||||
QUrl serverUrl;
|
||||
serverUrl.setPort(port.number());
|
||||
serverUrl.setScheme(urlTcpScheme());
|
||||
emit qmlServerReady(serverUrl);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,12 @@ void TestResultDelegate::currentChanged(const QModelIndex ¤t, const QModel
|
||||
emit sizeHintChanged(previous);
|
||||
}
|
||||
|
||||
void TestResultDelegate::clearCache()
|
||||
{
|
||||
m_lastProcessedIndex = QModelIndex();
|
||||
m_lastProcessedFont = QFont();
|
||||
}
|
||||
|
||||
void TestResultDelegate::recalculateTextLayout(const QModelIndex &index, const QString &output,
|
||||
const QFont &font, int width) const
|
||||
{
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void clearCache();
|
||||
|
||||
private:
|
||||
void recalculateTextLayout(const QModelIndex &index, const QString &output,
|
||||
|
||||
@@ -275,6 +275,8 @@ int TestResultsPane::priorityInStatusBar() const
|
||||
void TestResultsPane::clearContents()
|
||||
{
|
||||
m_filterModel->clearTestResults();
|
||||
if (auto delegate = qobject_cast<TestResultDelegate *>(m_treeView->itemDelegate()))
|
||||
delegate->clearCache();
|
||||
setIconBadgeNumber(0);
|
||||
navigateStateChanged();
|
||||
m_summaryWidget->setVisible(false);
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <debugger/sourceutils.h>
|
||||
#include <debugger/shared/cdbsymbolpathlisteditor.h>
|
||||
#include <debugger/shared/hostutils.h>
|
||||
#include <debugger/terminal.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagebox.h>
|
||||
@@ -178,12 +179,6 @@ Q_DECLARE_METATYPE(Debugger::Internal::MemoryChangeCookie)
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
static inline bool isCreatorConsole(const DebuggerRunParameters &sp)
|
||||
{
|
||||
return !boolSetting(UseCdbConsole) && sp.inferior.runMode == ApplicationLauncher::Console
|
||||
&& (sp.startMode == StartInternal || sp.startMode == StartExternal);
|
||||
}
|
||||
|
||||
// Base data structure for command queue entries with callback
|
||||
class CdbCommand
|
||||
{
|
||||
@@ -372,68 +367,6 @@ int CdbEngine::elapsedLogTime() const
|
||||
return delta;
|
||||
}
|
||||
|
||||
// Start the console stub with the sub process. Continue in consoleStubProcessStarted.
|
||||
bool CdbEngine::startConsole(const DebuggerRunParameters &sp, QString *errorMessage)
|
||||
{
|
||||
if (debug)
|
||||
qDebug("startConsole %s", qPrintable(sp.inferior.executable));
|
||||
m_consoleStub.reset(new ConsoleProcess);
|
||||
m_consoleStub->setMode(ConsoleProcess::Suspend);
|
||||
connect(m_consoleStub.data(), &ConsoleProcess::processError,
|
||||
this, &CdbEngine::consoleStubError);
|
||||
connect(m_consoleStub.data(), &ConsoleProcess::processStarted,
|
||||
this, &CdbEngine::consoleStubProcessStarted);
|
||||
connect(m_consoleStub.data(), &ConsoleProcess::stubStopped,
|
||||
this, &CdbEngine::consoleStubExited);
|
||||
m_consoleStub->setWorkingDirectory(sp.inferior.workingDirectory);
|
||||
if (sp.stubEnvironment.size())
|
||||
m_consoleStub->setEnvironment(sp.stubEnvironment);
|
||||
if (!m_consoleStub->start(sp.inferior.executable, sp.inferior.commandLineArguments)) {
|
||||
*errorMessage = tr("The console process \"%1\" could not be started.").arg(sp.inferior.executable);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CdbEngine::consoleStubError(const QString &msg)
|
||||
{
|
||||
if (debug)
|
||||
qDebug("consoleStubProcessMessage() in %s %s", qPrintable(stateName(state())), qPrintable(msg));
|
||||
if (state() == EngineSetupRequested) {
|
||||
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSetupFailed")
|
||||
notifyEngineSetupFailed();
|
||||
} else {
|
||||
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineIll")
|
||||
notifyEngineIll();
|
||||
}
|
||||
Core::AsynchronousMessageBox::critical(tr("Debugger Error"), msg);
|
||||
}
|
||||
|
||||
void CdbEngine::consoleStubProcessStarted()
|
||||
{
|
||||
if (debug)
|
||||
qDebug("consoleStubProcessStarted() PID=%lld", m_consoleStub->applicationPID());
|
||||
// Attach to console process.
|
||||
DebuggerRunParameters attachParameters = runParameters();
|
||||
attachParameters.inferior.executable.clear();
|
||||
attachParameters.inferior.commandLineArguments.clear();
|
||||
attachParameters.attachPID = ProcessHandle(m_consoleStub->applicationPID());
|
||||
attachParameters.startMode = AttachExternal;
|
||||
attachParameters.inferior.runMode = ApplicationLauncher::Gui; // Force no terminal.
|
||||
showMessage(QString("Attaching to %1...").arg(attachParameters.attachPID.pid()), LogMisc);
|
||||
QString errorMessage;
|
||||
if (!launchCDB(attachParameters, &errorMessage)) {
|
||||
showMessage(errorMessage, LogError);
|
||||
Core::AsynchronousMessageBox::critical(tr("Failed to Start the Debugger"), errorMessage);
|
||||
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSetupFailed")
|
||||
notifyEngineSetupFailed();
|
||||
}
|
||||
}
|
||||
|
||||
void CdbEngine::consoleStubExited()
|
||||
{
|
||||
}
|
||||
|
||||
void CdbEngine::createFullBacktrace()
|
||||
{
|
||||
runCommand({"~*kp", BuiltinCommand, [](const DebuggerResponse &response) {
|
||||
@@ -441,6 +374,13 @@ void CdbEngine::createFullBacktrace()
|
||||
}});
|
||||
}
|
||||
|
||||
void CdbEngine::handleSetupFailure(const QString &errorMessage)
|
||||
{
|
||||
showMessage(errorMessage, LogError);
|
||||
Core::AsynchronousMessageBox::critical(tr("Failed to Start the Debugger"), errorMessage);
|
||||
notifyEngineSetupFailed();
|
||||
}
|
||||
|
||||
void CdbEngine::setupEngine()
|
||||
{
|
||||
if (debug)
|
||||
@@ -449,31 +389,24 @@ void CdbEngine::setupEngine()
|
||||
init();
|
||||
if (!m_logTime.elapsed())
|
||||
m_logTime.start();
|
||||
QString errorMessage;
|
||||
|
||||
// Console: Launch the stub with the suspended application and attach to it
|
||||
// CDB in theory has a command line option '-2' that launches a
|
||||
// console, too, but that immediately closes when the debuggee quits.
|
||||
// Use the Creator stub instead.
|
||||
const DebuggerRunParameters &rp = runParameters();
|
||||
const bool launchConsole = isCreatorConsole(rp);
|
||||
m_effectiveStartMode = launchConsole ? AttachExternal : rp.startMode;
|
||||
const bool ok = launchConsole ?
|
||||
startConsole(runParameters(), &errorMessage) :
|
||||
launchCDB(runParameters(), &errorMessage);
|
||||
if (debug)
|
||||
qDebug("<setupEngine ok=%d", ok);
|
||||
if (!ok) {
|
||||
showMessage(errorMessage, LogError);
|
||||
Core::AsynchronousMessageBox::critical(tr("Failed to Start the Debugger"), errorMessage);
|
||||
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSetupFailed")
|
||||
notifyEngineSetupFailed();
|
||||
DebuggerRunParameters sp = runParameters();
|
||||
if (terminal()) {
|
||||
m_effectiveStartMode = AttachExternal;
|
||||
sp.inferior.executable.clear();
|
||||
sp.inferior.commandLineArguments.clear();
|
||||
sp.attachPID = ProcessHandle(terminal()->applicationPid());
|
||||
sp.startMode = AttachExternal;
|
||||
sp.inferior.runMode = ApplicationLauncher::Gui; // Force no terminal.
|
||||
showMessage(QString("Attaching to %1...").arg(sp.attachPID.pid()), LogMisc);
|
||||
} else {
|
||||
m_effectiveStartMode = sp.startMode;
|
||||
}
|
||||
}
|
||||
|
||||
bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage)
|
||||
{
|
||||
if (debug)
|
||||
qDebug("launchCDB startMode=%d", sp.startMode);
|
||||
const QChar blank(' ');
|
||||
// Start engine which will run until initial breakpoint:
|
||||
// Determine binary (force MSVC), extension lib name and path to use
|
||||
@@ -481,8 +414,8 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
//(does not work with absolute path names)
|
||||
const QString executable = sp.debugger.executable;
|
||||
if (executable.isEmpty()) {
|
||||
*errorMessage = tr("There is no CDB executable specified.");
|
||||
return false;
|
||||
handleSetupFailure(tr("There is no CDB executable specified."));
|
||||
return;
|
||||
}
|
||||
|
||||
bool cdbIs64Bit = Utils::is64BitWindowsBinary(executable);
|
||||
@@ -490,7 +423,7 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
m_wow64State = noWow64Stack;
|
||||
const QFileInfo extensionFi(CdbEngine::extensionLibraryName(cdbIs64Bit));
|
||||
if (!extensionFi.isFile()) {
|
||||
*errorMessage = tr("Internal error: The extension %1 cannot be found.\n"
|
||||
handleSetupFailure(tr("Internal error: The extension %1 cannot be found.\n"
|
||||
"If you have updated Qt Creator via Maintenance Tool, you may "
|
||||
"need to rerun the Tool and select \"Add or remove components\" "
|
||||
"and then select the\n"
|
||||
@@ -499,8 +432,8 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
"with another bitness than your Qt Creator build,\n"
|
||||
"you will need to build a separate CDB extension with the "
|
||||
"same bitness as the CDB you want to use.").
|
||||
arg(QDir::toNativeSeparators(extensionFi.absoluteFilePath()));
|
||||
return false;
|
||||
arg(QDir::toNativeSeparators(extensionFi.absoluteFilePath())));
|
||||
return;
|
||||
}
|
||||
const QString extensionFileName = extensionFi.fileName();
|
||||
// Prepare arguments
|
||||
@@ -552,7 +485,7 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
if (sp.startMode == AttachCrashedExternal) {
|
||||
arguments << "-e" << sp.crashParameter << "-g";
|
||||
} else {
|
||||
if (isCreatorConsole(runParameters()))
|
||||
if (terminal())
|
||||
arguments << "-pr" << "-pb";
|
||||
}
|
||||
break;
|
||||
@@ -560,8 +493,8 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
arguments << "-z" << sp.coreFile;
|
||||
break;
|
||||
default:
|
||||
*errorMessage = QString("Internal error: Unsupported start mode %1.").arg(sp.startMode);
|
||||
return false;
|
||||
handleSetupFailure(QString("Internal error: Unsupported start mode %1.").arg(sp.startMode));
|
||||
return;
|
||||
}
|
||||
if (!sp.inferior.commandLineArguments.isEmpty()) { // Complete native argument string.
|
||||
if (!nativeArguments.isEmpty())
|
||||
@@ -599,9 +532,9 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
#endif
|
||||
m_process.start(executable, arguments);
|
||||
if (!m_process.waitForStarted()) {
|
||||
*errorMessage = QString("Internal error: Cannot start process %1: %2").
|
||||
arg(QDir::toNativeSeparators(executable), m_process.errorString());
|
||||
return false;
|
||||
handleSetupFailure(QString("Internal error: Cannot start process %1: %2").
|
||||
arg(QDir::toNativeSeparators(executable), m_process.errorString()));
|
||||
return;
|
||||
}
|
||||
|
||||
const qint64 pid = m_process.processId();
|
||||
@@ -611,10 +544,8 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
if (isRemote) { // We do not get an 'idle' in a remote session, but are accessible
|
||||
m_accessible = true;
|
||||
runCommand({".load " + extensionFileName, NoFlags});
|
||||
STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSetupOk")
|
||||
notifyEngineSetupOk();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CdbEngine::setupInferior()
|
||||
|
||||
@@ -30,23 +30,14 @@
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QProcess>
|
||||
#include <QMap>
|
||||
#include <QVariant>
|
||||
#include <QTime>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace Utils { class ConsoleProcess; }
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DisassemblerAgent;
|
||||
class CdbCommand;
|
||||
struct MemoryViewCookie;
|
||||
class StringInputStream;
|
||||
class GdbMi;
|
||||
|
||||
class CdbEngine : public DebuggerEngine
|
||||
{
|
||||
@@ -123,10 +114,6 @@ private:
|
||||
void runCommand(const DebuggerCommand &cmd) override;
|
||||
void operateByInstructionTriggered(bool);
|
||||
|
||||
void consoleStubError(const QString &);
|
||||
void consoleStubProcessStarted();
|
||||
void consoleStubExited();
|
||||
|
||||
void createFullBacktrace();
|
||||
|
||||
void handleDoInterruptInferior(const QString &errorMessage);
|
||||
@@ -161,7 +148,6 @@ private:
|
||||
ScriptCommand
|
||||
};
|
||||
|
||||
bool startConsole(const DebuggerRunParameters &sp, QString *errorMessage);
|
||||
void init();
|
||||
unsigned examineStopReason(const GdbMi &stopReason, QString *message,
|
||||
QString *exceptionBoxMessage,
|
||||
@@ -170,7 +156,6 @@ private:
|
||||
bool commandsPending() const;
|
||||
void handleExtensionMessage(char t, int token, const QString &what, const QString &message);
|
||||
bool doSetupEngine(QString *errorMessage);
|
||||
bool launchCDB(const DebuggerRunParameters &sp, QString *errorMessage);
|
||||
void handleSessionAccessible(unsigned long cdbExState);
|
||||
void handleSessionInaccessible(unsigned long cdbExState);
|
||||
void handleSessionIdle(const QString &message);
|
||||
@@ -221,9 +206,9 @@ private:
|
||||
void mergeStartParametersSourcePathMap();
|
||||
|
||||
const QString m_tokenPrefix;
|
||||
void handleSetupFailure(const QString &errorMessage);
|
||||
|
||||
QProcess m_process;
|
||||
QScopedPointer<Utils::ConsoleProcess> m_consoleStub;
|
||||
DebuggerStartMode m_effectiveStartMode = NoStartMode;
|
||||
QByteArray m_outputBuffer;
|
||||
//! Debugger accessible (expecting commands)
|
||||
|
||||
@@ -435,7 +435,6 @@ void StartApplicationDialog::run(bool attachRemote)
|
||||
debugger->setDebugInfoLocation(newParameters.debugInfoLocation);
|
||||
debugger->setInferior(inferior);
|
||||
debugger->setServerStartScript(newParameters.serverStartScript); // Note: This requires inferior.
|
||||
debugger->setNeedFixup(false);
|
||||
|
||||
bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
||||
if (!attachRemote)
|
||||
|
||||
@@ -235,57 +235,23 @@ public:
|
||||
void doShutdownEngine();
|
||||
void doShutdownInferior();
|
||||
void doInterruptInferior();
|
||||
void doFinishDebugger();
|
||||
|
||||
void reloadDisassembly()
|
||||
{
|
||||
m_disassemblerAgent.reload();
|
||||
}
|
||||
|
||||
void queueSetupEngine()
|
||||
{
|
||||
m_engine->setState(EngineSetupRequested);
|
||||
m_engine->showMessage("QUEUE: SETUP ENGINE");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doSetupEngine);
|
||||
}
|
||||
|
||||
void queueSetupInferior()
|
||||
{
|
||||
m_engine->setState(InferiorSetupRequested);
|
||||
m_engine->showMessage("QUEUE: SETUP INFERIOR");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doSetupInferior);
|
||||
}
|
||||
|
||||
void queueRunEngine()
|
||||
{
|
||||
m_engine->setState(EngineRunRequested);
|
||||
m_engine->showMessage("QUEUE: RUN ENGINE");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doRunEngine);
|
||||
}
|
||||
|
||||
void queueShutdownEngine()
|
||||
{
|
||||
m_engine->setState(EngineShutdownRequested);
|
||||
m_engine->showMessage("QUEUE: SHUTDOWN ENGINE");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doShutdownEngine);
|
||||
}
|
||||
|
||||
void queueShutdownInferior()
|
||||
{
|
||||
m_engine->setState(InferiorShutdownRequested);
|
||||
m_engine->showMessage("QUEUE: SHUTDOWN INFERIOR");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doShutdownInferior);
|
||||
}
|
||||
|
||||
void queueFinishDebugger()
|
||||
void doFinishDebugger()
|
||||
{
|
||||
QTC_ASSERT(state() == EngineShutdownOk
|
||||
|| state() == EngineShutdownFailed, qDebug() << state());
|
||||
m_engine->setState(DebuggerFinished);
|
||||
resetLocation();
|
||||
if (isMasterEngine()) {
|
||||
m_engine->showMessage("QUEUE: FINISH DEBUGGER");
|
||||
QTimer::singleShot(0, this, &DebuggerEnginePrivate::doFinishDebugger);
|
||||
m_engine->showMessage("NOTE: FINISH DEBUGGER");
|
||||
QTC_ASSERT(state() == DebuggerFinished, qDebug() << m_engine << state());
|
||||
if (isMasterEngine() && m_runTool)
|
||||
m_runTool->debuggingFinished();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,9 +280,6 @@ public:
|
||||
public:
|
||||
DebuggerState state() const { return m_state; }
|
||||
bool isMasterEngine() const { return m_engine->isMasterEngine(); }
|
||||
DebuggerRunTool *runTool() const
|
||||
{ return m_masterEngine ? m_masterEngine->runTool() : m_runTool.data(); }
|
||||
RunControl *runControl() const;
|
||||
|
||||
DebuggerEngine *m_engine = nullptr; // Not owned.
|
||||
DebuggerEngine *m_masterEngine = nullptr; // Not owned
|
||||
@@ -325,9 +288,6 @@ public:
|
||||
// The current state.
|
||||
DebuggerState m_state = DebuggerNotReady;
|
||||
|
||||
// The state we had before something unexpected happend.
|
||||
DebuggerState m_lastGoodState = DebuggerNotReady;
|
||||
|
||||
// Terminal m_terminal;
|
||||
ProcessHandle m_inferiorPid;
|
||||
|
||||
@@ -535,13 +495,12 @@ void DebuggerEngine::start()
|
||||
const DebuggerRunParameters &rp = runParameters();
|
||||
d->m_inferiorPid = rp.attachPID.isValid() ? rp.attachPID : ProcessHandle();
|
||||
if (d->m_inferiorPid.isValid())
|
||||
runControl()->setApplicationProcessHandle(d->m_inferiorPid);
|
||||
d->m_runTool->runControl()->setApplicationProcessHandle(d->m_inferiorPid);
|
||||
|
||||
action(OperateByInstruction)->setEnabled(hasCapability(DisassemblerCapability));
|
||||
|
||||
QTC_ASSERT(state() == DebuggerNotReady || state() == DebuggerFinished,
|
||||
qDebug() << state());
|
||||
d->m_lastGoodState = DebuggerNotReady;
|
||||
d->m_progress.setProgressValue(200);
|
||||
|
||||
// d->m_terminal.setup();
|
||||
@@ -557,7 +516,7 @@ void DebuggerEngine::start()
|
||||
// });
|
||||
// }
|
||||
|
||||
d->queueSetupEngine();
|
||||
d->doSetupEngine();
|
||||
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << this << state());
|
||||
}
|
||||
|
||||
@@ -632,11 +591,6 @@ DebuggerState DebuggerEngine::state() const
|
||||
return d->m_state;
|
||||
}
|
||||
|
||||
DebuggerState DebuggerEngine::lastGoodState() const
|
||||
{
|
||||
return d->m_lastGoodState;
|
||||
}
|
||||
|
||||
static bool isAllowedTransition(DebuggerState from, DebuggerState to)
|
||||
{
|
||||
switch (from) {
|
||||
@@ -712,13 +666,13 @@ static bool isAllowedTransition(DebuggerState from, DebuggerState to)
|
||||
void DebuggerEngine::setupSlaveEngine()
|
||||
{
|
||||
QTC_CHECK(state() == DebuggerNotReady);
|
||||
d->queueSetupEngine();
|
||||
d->doSetupEngine();
|
||||
}
|
||||
|
||||
void DebuggerEnginePrivate::doSetupEngine()
|
||||
{
|
||||
m_engine->setState(EngineSetupRequested);
|
||||
m_engine->showMessage("CALL: SETUP ENGINE");
|
||||
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << m_engine << state());
|
||||
m_engine->setupEngine();
|
||||
}
|
||||
|
||||
@@ -739,20 +693,20 @@ void DebuggerEngine::notifyEngineSetupOk()
|
||||
setState(EngineSetupOk);
|
||||
if (isMasterEngine() && runTool()) {
|
||||
runTool()->reportStarted();
|
||||
d->queueSetupInferior();
|
||||
d->doSetupInferior();
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerEngine::setupSlaveInferior()
|
||||
{
|
||||
QTC_CHECK(state() == EngineSetupOk);
|
||||
d->queueSetupInferior();
|
||||
d->doSetupInferior();
|
||||
}
|
||||
|
||||
void DebuggerEnginePrivate::doSetupInferior()
|
||||
{
|
||||
m_engine->setState(InferiorSetupRequested);
|
||||
m_engine->showMessage("CALL: SETUP INFERIOR");
|
||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << m_engine << state());
|
||||
m_progress.setProgressValue(250);
|
||||
m_engine->setupInferior();
|
||||
}
|
||||
@@ -764,7 +718,7 @@ void DebuggerEngine::notifyInferiorSetupFailed()
|
||||
showStatusMessage(tr("Setup failed."));
|
||||
setState(InferiorSetupFailed);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorSetupOk()
|
||||
@@ -778,20 +732,20 @@ void DebuggerEngine::notifyInferiorSetupOk()
|
||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << this << state());
|
||||
setState(InferiorSetupOk);
|
||||
if (isMasterEngine())
|
||||
d->queueRunEngine();
|
||||
d->doRunEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::runSlaveEngine()
|
||||
{
|
||||
QTC_ASSERT(isSlaveEngine(), return);
|
||||
QTC_CHECK(state() == InferiorSetupOk);
|
||||
d->queueRunEngine();
|
||||
d->doRunEngine();
|
||||
}
|
||||
|
||||
void DebuggerEnginePrivate::doRunEngine()
|
||||
{
|
||||
m_engine->setState(EngineRunRequested);
|
||||
m_engine->showMessage("CALL: RUN ENGINE");
|
||||
QTC_ASSERT(state() == EngineRunRequested, qDebug() << m_engine << state());
|
||||
m_progress.setProgressValue(300);
|
||||
m_engine->runEngine();
|
||||
}
|
||||
@@ -816,7 +770,7 @@ void DebuggerEngine::notifyEngineRunFailed()
|
||||
showStatusMessage(tr("Run failed."));
|
||||
setState(EngineRunFailed);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
|
||||
@@ -869,7 +823,7 @@ void DebuggerEngine::notifyInferiorRunFailed()
|
||||
setState(InferiorRunFailed);
|
||||
setState(InferiorStopOk);
|
||||
if (isDying())
|
||||
d->queueShutdownInferior();
|
||||
d->doShutdownInferior();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorStopOk()
|
||||
@@ -886,7 +840,7 @@ void DebuggerEngine::notifyInferiorStopOk()
|
||||
setState(InferiorStopOk);
|
||||
}
|
||||
if (state() == InferiorStopOk || state() == InferiorStopFailed)
|
||||
d->queueShutdownInferior();
|
||||
d->doShutdownInferior();
|
||||
showMessage("NOTE: ... IGNORING STOP MESSAGE");
|
||||
return;
|
||||
}
|
||||
@@ -911,7 +865,7 @@ void DebuggerEngine::notifyInferiorStopFailed()
|
||||
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << this << state());
|
||||
setState(InferiorStopFailed);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEnginePrivate::doInterruptInferior()
|
||||
@@ -926,8 +880,8 @@ void DebuggerEnginePrivate::doInterruptInferior()
|
||||
|
||||
void DebuggerEnginePrivate::doShutdownInferior()
|
||||
{
|
||||
m_engine->setState(InferiorShutdownRequested);
|
||||
//QTC_ASSERT(isMasterEngine(), return);
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << m_engine << state());
|
||||
resetLocation();
|
||||
m_engine->showMessage("CALL: SHUTDOWN INFERIOR");
|
||||
m_engine->shutdownInferior();
|
||||
@@ -937,10 +891,9 @@ void DebuggerEngine::notifyInferiorShutdownOk()
|
||||
{
|
||||
showMessage("INFERIOR SUCCESSFULLY SHUT DOWN");
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << this << state());
|
||||
d->m_lastGoodState = DebuggerNotReady; // A "neutral" value.
|
||||
setState(InferiorShutdownOk);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorShutdownFailed()
|
||||
@@ -949,7 +902,7 @@ void DebuggerEngine::notifyInferiorShutdownFailed()
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << this << state());
|
||||
setState(InferiorShutdownFailed);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorIll()
|
||||
@@ -958,7 +911,6 @@ void DebuggerEngine::notifyInferiorIll()
|
||||
// This can be issued in almost any state. The inferior could still be
|
||||
// alive as some previous notifications might have been bogus.
|
||||
runTool()->startDying();
|
||||
d->m_lastGoodState = d->m_state;
|
||||
if (state() == InferiorRunRequested) {
|
||||
// We asked for running, but did not see a response.
|
||||
// Assume the inferior is dead.
|
||||
@@ -966,7 +918,7 @@ void DebuggerEngine::notifyInferiorIll()
|
||||
setState(InferiorRunFailed);
|
||||
setState(InferiorStopOk);
|
||||
}
|
||||
d->queueShutdownInferior();
|
||||
d->doShutdownInferior();
|
||||
}
|
||||
|
||||
void DebuggerEngine::shutdownSlaveEngine()
|
||||
@@ -978,10 +930,10 @@ void DebuggerEngine::shutdownSlaveEngine()
|
||||
|
||||
void DebuggerEnginePrivate::doShutdownEngine()
|
||||
{
|
||||
m_engine->setState(EngineShutdownRequested);
|
||||
QTC_ASSERT(isMasterEngine(), qDebug() << m_engine; return);
|
||||
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << m_engine << state());
|
||||
QTC_ASSERT(runTool(), return);
|
||||
runTool()->startDying();
|
||||
QTC_ASSERT(m_runTool, return);
|
||||
m_runTool->startDying();
|
||||
m_engine->showMessage("CALL: SHUTDOWN ENGINE");
|
||||
m_engine->shutdownEngine();
|
||||
}
|
||||
@@ -991,7 +943,7 @@ void DebuggerEngine::notifyEngineShutdownOk()
|
||||
showMessage("NOTE: ENGINE SHUTDOWN OK");
|
||||
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << this << state());
|
||||
setState(EngineShutdownOk);
|
||||
d->queueFinishDebugger();
|
||||
d->doFinishDebugger();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyEngineShutdownFailed()
|
||||
@@ -999,21 +951,7 @@ void DebuggerEngine::notifyEngineShutdownFailed()
|
||||
showMessage("NOTE: ENGINE SHUTDOWN FAILED");
|
||||
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << this << state());
|
||||
setState(EngineShutdownFailed);
|
||||
d->queueFinishDebugger();
|
||||
}
|
||||
|
||||
void DebuggerEnginePrivate::doFinishDebugger()
|
||||
{
|
||||
m_engine->showMessage("NOTE: FINISH DEBUGGER");
|
||||
QTC_ASSERT(state() == DebuggerFinished, qDebug() << m_engine << state());
|
||||
if (isMasterEngine() && m_runTool)
|
||||
m_runTool->debuggingFinished();
|
||||
}
|
||||
|
||||
RunControl *DebuggerEnginePrivate::runControl() const
|
||||
{
|
||||
DebuggerRunTool *tool = runTool();
|
||||
return tool ? tool->runControl() : nullptr;
|
||||
d->doFinishDebugger();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyEngineIll()
|
||||
@@ -1024,7 +962,6 @@ void DebuggerEngine::notifyEngineIll()
|
||||
//#endif
|
||||
showMessage("NOTE: ENGINE ILL ******");
|
||||
runTool()->startDying();
|
||||
d->m_lastGoodState = d->m_state;
|
||||
switch (state()) {
|
||||
case InferiorRunRequested:
|
||||
case InferiorRunOk:
|
||||
@@ -1042,11 +979,11 @@ void DebuggerEngine::notifyEngineIll()
|
||||
showMessage("FORWARDING STATE TO InferiorShutdownFailed");
|
||||
setState(InferiorShutdownFailed, true);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
break;
|
||||
default:
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1060,7 +997,7 @@ void DebuggerEngine::notifyEngineSpontaneousShutdown()
|
||||
showMessage("NOTE: ENGINE SPONTANEOUS SHUTDOWN");
|
||||
setState(EngineShutdownOk, true);
|
||||
if (isMasterEngine())
|
||||
d->queueFinishDebugger();
|
||||
d->doFinishDebugger();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorExited()
|
||||
@@ -1073,7 +1010,7 @@ void DebuggerEngine::notifyInferiorExited()
|
||||
d->resetLocation();
|
||||
setState(InferiorShutdownOk);
|
||||
if (isMasterEngine())
|
||||
d->queueShutdownEngine();
|
||||
d->doShutdownEngine();
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
|
||||
@@ -1275,7 +1212,7 @@ void DebuggerEngine::notifyInferiorPid(const ProcessHandle &pid)
|
||||
return;
|
||||
d->m_inferiorPid = pid;
|
||||
if (pid.isValid()) {
|
||||
runControl()->setApplicationProcessHandle(pid);
|
||||
d->m_runTool->runControl()->setApplicationProcessHandle(pid);
|
||||
showMessage(tr("Taking notice of pid %1").arg(pid.pid()));
|
||||
DebuggerStartMode sm = runParameters().startMode;
|
||||
if (sm == StartInternal || sm == StartExternal || sm == AttachExternal)
|
||||
@@ -1309,7 +1246,7 @@ void DebuggerEngine::quitDebugger()
|
||||
case InferiorStopOk:
|
||||
case InferiorStopFailed:
|
||||
case InferiorUnrunnable:
|
||||
d->queueShutdownInferior();
|
||||
d->doShutdownInferior();
|
||||
break;
|
||||
case InferiorRunOk:
|
||||
d->doInterruptInferior();
|
||||
@@ -1351,8 +1288,8 @@ void DebuggerEngine::abortDebugger()
|
||||
// We already tried. Try harder.
|
||||
showMessage("ABORTING DEBUGGER. SECOND TIME.");
|
||||
abortDebuggerProcess();
|
||||
if (runControl())
|
||||
runControl()->initiateFinish();
|
||||
if (d->m_runTool && d->m_runTool->runControl())
|
||||
d->m_runTool->runControl()->initiateFinish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1367,11 +1304,6 @@ void DebuggerEngine::progressPing()
|
||||
d->m_progress.setProgressValue(progress);
|
||||
}
|
||||
|
||||
RunControl *DebuggerEngine::runControl() const
|
||||
{
|
||||
return d->runControl();
|
||||
}
|
||||
|
||||
DebuggerRunTool *DebuggerEngine::runTool() const
|
||||
{
|
||||
return d->m_runTool.data();
|
||||
|
||||
@@ -344,7 +344,6 @@ public:
|
||||
static bool debuggerActionsEnabled(DebuggerState state);
|
||||
|
||||
DebuggerState state() const;
|
||||
DebuggerState lastGoodState() const;
|
||||
bool isDying() const;
|
||||
|
||||
static QString stateName(int s);
|
||||
@@ -459,7 +458,6 @@ protected:
|
||||
|
||||
void setMasterEngine(DebuggerEngine *masterEngine);
|
||||
|
||||
ProjectExplorer::RunControl *runControl() const;
|
||||
TerminalRunner *terminal() const;
|
||||
|
||||
static QString msgStopped(const QString &reason = QString());
|
||||
|
||||
@@ -3425,6 +3425,7 @@ static BuildConfiguration::BuildType startupBuildType()
|
||||
void showCannotStartDialog(const QString &text)
|
||||
{
|
||||
QMessageBox *errorDialog = new QMessageBox(ICore::mainWindow());
|
||||
errorDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
errorDialog->setIcon(QMessageBox::Warning);
|
||||
errorDialog->setWindowTitle(text);
|
||||
errorDialog->setText(DebuggerPlugin::tr("Cannot start %1 without a project. Please open the project "
|
||||
|
||||
@@ -798,15 +798,6 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit)
|
||||
m_runParameters.macroExpander = kit->macroExpander();
|
||||
m_runParameters.debugger = DebuggerKitInformation::runnable(kit);
|
||||
|
||||
Runnable r = runnable();
|
||||
if (r.is<StandardRunnable>()) {
|
||||
m_runParameters.inferior = r.as<StandardRunnable>();
|
||||
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
|
||||
m_runParameters.inferior.workingDirectory =
|
||||
FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory);
|
||||
setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console);
|
||||
}
|
||||
|
||||
if (auto aspect = runConfig ? runConfig->extraAspect<DebuggerRunConfigurationAspect>() : nullptr) {
|
||||
m_runParameters.isCppDebugging = aspect->useCppDebugger();
|
||||
m_runParameters.isQmlDebugging = aspect->useQmlDebugger();
|
||||
@@ -816,6 +807,15 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit)
|
||||
if (m_runParameters.isCppDebugging)
|
||||
m_runParameters.cppEngineType = DebuggerKitInformation::engineType(kit);
|
||||
|
||||
Runnable r = runnable();
|
||||
if (r.is<StandardRunnable>()) {
|
||||
m_runParameters.inferior = r.as<StandardRunnable>();
|
||||
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
|
||||
m_runParameters.inferior.workingDirectory =
|
||||
FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory);
|
||||
setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console);
|
||||
}
|
||||
|
||||
const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH");
|
||||
if (!envBinary.isEmpty())
|
||||
m_runParameters.debugger.executable = QString::fromLocal8Bit(envBinary);
|
||||
@@ -856,6 +856,15 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit)
|
||||
m_engine = createPdbEngine();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_runParameters.cppEngineType == CdbEngineType
|
||||
&& !boolSetting(UseCdbConsole)
|
||||
&& m_runParameters.inferior.runMode == ApplicationLauncher::Console
|
||||
&& (m_runParameters.startMode == StartInternal
|
||||
|| m_runParameters.startMode == StartExternal)) {
|
||||
d->terminalRunner = new TerminalRunner(this);
|
||||
addStartDependency(d->terminalRunner);
|
||||
}
|
||||
}
|
||||
|
||||
DebuggerEngine *DebuggerRunTool::activeEngine() const
|
||||
|
||||
@@ -125,7 +125,6 @@ public:
|
||||
void setIosPlatform(const QString &platform);
|
||||
void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot);
|
||||
|
||||
void setNeedFixup(bool) {} // FIXME: Remove after use in QtAppMan is gone.
|
||||
void setTestCase(int testCase);
|
||||
void setOverrideStartScript(const QString &script);
|
||||
|
||||
|
||||
@@ -3221,8 +3221,9 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri
|
||||
const StackFrame &frame = frames.at(0);
|
||||
function = frame.function + ":" + QString::number(frame.line);
|
||||
}
|
||||
QTC_ASSERT(runControl()->runConfiguration(), return);
|
||||
auto rc = new RunControl(runControl()->runConfiguration(), ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
auto runConfig = runTool()->runControl()->runConfiguration();
|
||||
QTC_ASSERT(runConfig, return);
|
||||
auto rc = new RunControl(runConfig, ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
auto debugger = new DebuggerRunTool(rc);
|
||||
debugger->setStartMode(AttachCore);
|
||||
debugger->setRunControlName(function + ": " + QDateTime::currentDateTime().toString());
|
||||
@@ -4546,8 +4547,7 @@ void GdbEngine::shutdownEngine()
|
||||
}
|
||||
|
||||
CHECK_STATE(EngineShutdownRequested);
|
||||
showMessage(QString("INITIATE GDBENGINE SHUTDOWN IN STATE %1, PROC: %2")
|
||||
.arg(lastGoodState()).arg(m_gdbProc.state()));
|
||||
showMessage(QString("INITIATE GDBENGINE SHUTDOWN, PROC STATE: %1").arg(m_gdbProc.state()));
|
||||
m_commandsDoneCallback = 0;
|
||||
switch (m_gdbProc.state()) {
|
||||
case QProcess::Running: {
|
||||
|
||||
@@ -335,7 +335,7 @@ void QmlEngine::handleLauncherStarted()
|
||||
{
|
||||
// FIXME: The QmlEngine never calls notifyInferiorPid() triggering the
|
||||
// raising, so do it here manually for now.
|
||||
runControl()->applicationProcessHandle().activate();
|
||||
runTool()->runControl()->applicationProcessHandle().activate();
|
||||
tryToConnect();
|
||||
}
|
||||
|
||||
|
||||
@@ -317,9 +317,9 @@ void GerritPlugin::push(const QString &topLevel)
|
||||
// QScopedPointer is required to delete the dialog when leaving the function
|
||||
GerritPushDialog dialog(topLevel, m_reviewers, m_parameters, ICore::mainWindow());
|
||||
|
||||
if (!dialog.isValid()) {
|
||||
QMessageBox::warning(ICore::mainWindow(), tr("Initialization Failed"),
|
||||
tr("Failed to initialize dialog. Aborting."));
|
||||
const QString initErrorMessage = dialog.initErrorMessage();
|
||||
if (!initErrorMessage.isEmpty()) {
|
||||
QMessageBox::warning(ICore::mainWindow(), tr("Initialization Failed"), initErrorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,8 +135,10 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &rev
|
||||
|
||||
initRemoteBranches();
|
||||
|
||||
if (m_ui->remoteComboBox->isEmpty())
|
||||
if (m_ui->remoteComboBox->isEmpty()) {
|
||||
m_initErrorMessage = tr("Cannot find a Gerrit remote. Add one and try again.");
|
||||
return;
|
||||
}
|
||||
|
||||
m_ui->localBranchComboBox->init(workingDir);
|
||||
connect(m_ui->localBranchComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
@@ -158,8 +160,6 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &rev
|
||||
|
||||
connect(m_ui->remoteComboBox, &GerritRemoteChooser::remoteChanged,
|
||||
this, [this] { setRemoteBranches(); });
|
||||
|
||||
m_isValid = true;
|
||||
}
|
||||
|
||||
GerritPushDialog::~GerritPushDialog()
|
||||
@@ -209,9 +209,9 @@ void GerritPushDialog::setChangeRange()
|
||||
tr("Number of commits between %1 and %2: %3").arg(branch, remote, range));
|
||||
}
|
||||
|
||||
bool GerritPushDialog::isValid() const
|
||||
QString GerritPushDialog::initErrorMessage() const
|
||||
{
|
||||
return m_isValid;
|
||||
return m_initErrorMessage;
|
||||
}
|
||||
|
||||
void GerritPushDialog::storeTopic()
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
QString selectedPushType() const;
|
||||
QString selectedTopic() const;
|
||||
QString reviewers() const;
|
||||
bool isValid() const;
|
||||
QString initErrorMessage() const;
|
||||
void storeTopic();
|
||||
|
||||
private:
|
||||
@@ -73,9 +73,9 @@ private:
|
||||
QString calculateChangeRange(const QString &branch);
|
||||
QString m_workingDir;
|
||||
QString m_suggestedRemoteBranch;
|
||||
QString m_initErrorMessage;
|
||||
Ui::GerritPushDialog *m_ui;
|
||||
RemoteBranchesMap m_remoteBranches;
|
||||
bool m_isValid = false;
|
||||
bool m_hasLocalCommits = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
m_localServer->listen(socketToken);
|
||||
m_localServer->setMaxPendingConnections(3);
|
||||
|
||||
PuppetCreator puppetCreator(kit, project, QString(), nodeInstanceView->model());
|
||||
PuppetCreator puppetCreator(kit, project, nodeInstanceView->model());
|
||||
puppetCreator.setQrcMappingString(qrcMappingString());
|
||||
|
||||
puppetCreator.createPuppetExecutableIfMissing();
|
||||
puppetCreator.createQml2PuppetExecutableIfMissing();
|
||||
|
||||
m_qmlPuppetEditorProcess = puppetCreator.createPuppetProcess("editormode",
|
||||
socketToken,
|
||||
|
||||
@@ -70,10 +70,7 @@ namespace QmlDesigner {
|
||||
class EventFilter : public QObject {
|
||||
|
||||
public:
|
||||
EventFilter()
|
||||
{}
|
||||
|
||||
bool eventFilter(QObject *o, QEvent *event)
|
||||
bool eventFilter(QObject *o, QEvent *event) final
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonPress
|
||||
|| event->type() == QEvent::MouseButtonRelease
|
||||
@@ -90,10 +87,11 @@ QHash<Core::Id, PuppetCreator::PuppetType> PuppetCreator::m_qml2PuppetForKitPupp
|
||||
|
||||
QByteArray PuppetCreator::qtHash() const
|
||||
{
|
||||
if (m_kit) {
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
|
||||
if (currentQtVersion)
|
||||
return QCryptographicHash::hash(currentQtVersion->qmakeProperty("QT_INSTALL_DATA").toUtf8(), QCryptographicHash::Sha1).toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
|
||||
if (currentQtVersion) {
|
||||
return QCryptographicHash::hash(currentQtVersion->qmakeProperty("QT_INSTALL_DATA").toUtf8(),
|
||||
QCryptographicHash::Sha1)
|
||||
.toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
|
||||
}
|
||||
|
||||
return QByteArray();
|
||||
@@ -101,11 +99,9 @@ QByteArray PuppetCreator::qtHash() const
|
||||
|
||||
QDateTime PuppetCreator::qtLastModified() const
|
||||
{
|
||||
if (m_kit) {
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
|
||||
if (currentQtVersion)
|
||||
return QFileInfo(currentQtVersion->qmakeProperty("QT_INSTALL_LIBS")).lastModified();
|
||||
}
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitInformation::qtVersion(m_kit);
|
||||
if (currentQtVersion)
|
||||
return QFileInfo(currentQtVersion->qmakeProperty("QT_INSTALL_LIBS")).lastModified();
|
||||
|
||||
return QDateTime();
|
||||
}
|
||||
@@ -167,29 +163,18 @@ QString PuppetCreator::getStyleConfigFileName() const
|
||||
|
||||
PuppetCreator::PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const QString &qtCreatorVersion,
|
||||
const Model *model)
|
||||
|
||||
: m_qtCreatorVersion(qtCreatorVersion)
|
||||
,m_kit(kit)
|
||||
: m_kit(kit)
|
||||
,m_availablePuppetType(FallbackPuppet)
|
||||
,m_model(model)
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
,m_designerSettings(QmlDesignerPlugin::instance()->settings())
|
||||
#endif
|
||||
,m_currentProject(project)
|
||||
, m_currentProject(project)
|
||||
{
|
||||
}
|
||||
|
||||
PuppetCreator::~PuppetCreator()
|
||||
{
|
||||
}
|
||||
|
||||
void PuppetCreator::createPuppetExecutableIfMissing()
|
||||
{
|
||||
createQml2PuppetExecutableIfMissing();
|
||||
}
|
||||
|
||||
QProcess *PuppetCreator::createPuppetProcess(const QString &puppetMode,
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
@@ -214,7 +199,7 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const
|
||||
{
|
||||
QProcess *puppetProcess = new QProcess;
|
||||
auto puppetProcess = new QProcess;
|
||||
puppetProcess->setObjectName(puppetMode);
|
||||
puppetProcess->setProcessEnvironment(processEnvironment());
|
||||
|
||||
@@ -225,9 +210,9 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
|
||||
QString forwardOutput = m_designerSettings.value(DesignerSettingsKey::
|
||||
FORWARD_PUPPET_OUTPUT).toString();
|
||||
#else
|
||||
QString forwardOutput(QLatin1String("all"));
|
||||
QString forwardOutput("all");
|
||||
#endif
|
||||
if (forwardOutput == puppetMode || forwardOutput == QLatin1String("all")) {
|
||||
if (forwardOutput == puppetMode || forwardOutput == "all") {
|
||||
puppetProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||
QObject::connect(puppetProcess, SIGNAL(readyRead()), handlerObject, outputSlot);
|
||||
}
|
||||
@@ -238,13 +223,13 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
|
||||
QString debugPuppet = m_designerSettings.value(DesignerSettingsKey::
|
||||
DEBUG_PUPPET).toString();
|
||||
#else
|
||||
QString debugPuppet(QLatin1String("all"));
|
||||
QString debugPuppet("all");
|
||||
#endif
|
||||
if (debugPuppet == puppetMode || debugPuppet == QLatin1String("all")) {
|
||||
if (debugPuppet == puppetMode || debugPuppet == "all") {
|
||||
QMessageBox::information(Core::ICore::dialogParent(),
|
||||
QStringLiteral("Puppet is starting ..."),
|
||||
QStringLiteral("You can now attach your debugger to the %1 puppet with process id: %2."
|
||||
).arg(puppetMode, QString::number(puppetProcess->processId())));
|
||||
QCoreApplication::translate("PuppetCreator", "Puppet is starting ..."),
|
||||
QCoreApplication::translate("PuppetCreator", "You can now attach your debugger to the %1 puppet with process id: %2.")
|
||||
.arg(puppetMode, QString::number(puppetProcess->processId())));
|
||||
}
|
||||
|
||||
return puppetProcess;
|
||||
@@ -283,13 +268,13 @@ bool PuppetCreator::build(const QString &qmlPuppetProjectFilePath) const
|
||||
if (qtIsSupported()) {
|
||||
if (buildDirectory.isValid()) {
|
||||
QStringList qmakeArguments;
|
||||
qmakeArguments.append(QStringLiteral("-r"));
|
||||
qmakeArguments.append(QStringLiteral("-after"));
|
||||
qmakeArguments.append(QStringLiteral("DESTDIR=") + qmlPuppetDirectory(UserSpacePuppet));
|
||||
qmakeArguments.append("-r");
|
||||
qmakeArguments.append("-after");
|
||||
qmakeArguments.append("DESTDIR=" + qmlPuppetDirectory(UserSpacePuppet));
|
||||
#ifdef QT_DEBUG
|
||||
qmakeArguments.append(QStringLiteral("CONFIG+=debug"));
|
||||
qmakeArguments.append("CONFIG+=debug");
|
||||
#else
|
||||
qmakeArguments.append(QStringLiteral("CONFIG+=release"));
|
||||
qmakeArguments.append("CONFIG+=release");
|
||||
#endif
|
||||
qmakeArguments.append(qmlPuppetProjectFilePath);
|
||||
buildSucceeded = startBuildProcess(buildDirectory.path(), qmakeCommand(), qmakeArguments, &progressDialog);
|
||||
@@ -297,8 +282,8 @@ bool PuppetCreator::build(const QString &qmlPuppetProjectFilePath) const
|
||||
progressDialog.show();
|
||||
QString buildingCommand = buildCommand();
|
||||
QStringList buildArguments;
|
||||
if (buildingCommand == QStringLiteral("make")) {
|
||||
buildArguments.append(QStringLiteral("-j"));
|
||||
if (buildingCommand == "make") {
|
||||
buildArguments.append("-j");
|
||||
buildArguments.append(idealProcessCount());
|
||||
}
|
||||
buildSucceeded = startBuildProcess(buildDirectory.path(), buildingCommand, buildArguments, &progressDialog);
|
||||
@@ -345,7 +330,7 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
|
||||
// check if there was an already failing try to get the UserSpacePuppet
|
||||
// -> imagine as result a FallbackPuppet and nothing will happen again
|
||||
if (m_qml2PuppetForKitPuppetHash.value(m_kit->id(), UserSpacePuppet) == UserSpacePuppet ) {
|
||||
if (checkQml2PuppetIsReady()) {
|
||||
if (checkPuppetIsReady(qml2PuppetPath(UserSpacePuppet))) {
|
||||
m_availablePuppetType = UserSpacePuppet;
|
||||
} else {
|
||||
if (m_kit->isValid()) {
|
||||
@@ -363,8 +348,7 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
|
||||
|
||||
QString PuppetCreator::defaultPuppetToplevelBuildDirectory()
|
||||
{
|
||||
return Core::ICore::userResourcePath()
|
||||
+ QStringLiteral("/qmlpuppet/");
|
||||
return Core::ICore::userResourcePath() + "/qmlpuppet/";
|
||||
}
|
||||
|
||||
QString PuppetCreator::qmlPuppetToplevelBuildDirectory() const
|
||||
@@ -383,8 +367,8 @@ QString PuppetCreator::qmlPuppetToplevelBuildDirectory() const
|
||||
QString PuppetCreator::qmlPuppetDirectory(PuppetType puppetType) const
|
||||
{
|
||||
if (puppetType == UserSpacePuppet)
|
||||
return qmlPuppetToplevelBuildDirectory() + QStringLiteral("/")
|
||||
+ QCoreApplication::applicationVersion() + QStringLiteral("/") + QString::fromLatin1(qtHash());
|
||||
return qmlPuppetToplevelBuildDirectory() + '/' + QCoreApplication::applicationVersion()
|
||||
+ '/' + QString::fromLatin1(qtHash());
|
||||
|
||||
return qmlPuppetFallbackDirectory();
|
||||
}
|
||||
@@ -392,7 +376,7 @@ QString PuppetCreator::qmlPuppetDirectory(PuppetType puppetType) const
|
||||
QString PuppetCreator::defaultPuppetFallbackDirectory()
|
||||
{
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
return Core::ICore::libexecPath() + QLatin1String("/qmldesigner");
|
||||
return Core::ICore::libexecPath() + "/qmldesigner";
|
||||
else
|
||||
return Core::ICore::libexecPath();
|
||||
}
|
||||
@@ -412,7 +396,7 @@ QString PuppetCreator::qmlPuppetFallbackDirectory() const
|
||||
|
||||
QString PuppetCreator::qml2PuppetPath(PuppetType puppetType) const
|
||||
{
|
||||
return qmlPuppetDirectory(puppetType) + QStringLiteral("/qml2puppet") + QStringLiteral(QTC_HOST_EXE_SUFFIX);
|
||||
return qmlPuppetDirectory(puppetType) + "/qml2puppet" + QTC_HOST_EXE_SUFFIX;
|
||||
}
|
||||
|
||||
static void filterOutQtBaseImportPath(QStringList *stringList)
|
||||
@@ -429,12 +413,12 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
||||
if (!useOnlyFallbackPuppet())
|
||||
m_kit->addToEnvironment(environment);
|
||||
environment.set(QLatin1String("QML_BAD_GUI_RENDER_LOOP"), QLatin1String("true"));
|
||||
environment.set(QLatin1String("QML_USE_MOCKUPS"), QLatin1String("true"));
|
||||
environment.set(QLatin1String("QML_PUPPET_MODE"), QLatin1String("true"));
|
||||
environment.set(QLatin1String("QML_DISABLE_DISK_CACHE"), QLatin1String("true"));
|
||||
environment.set("QML_BAD_GUI_RENDER_LOOP", "true");
|
||||
environment.set("QML_USE_MOCKUPS", "true");
|
||||
environment.set("QML_PUPPET_MODE", "true");
|
||||
environment.set("QML_DISABLE_DISK_CACHE", "true");
|
||||
if (!environment.hasKey("QT_SCREEN_SCALE_FACTORS"))
|
||||
environment.set(QLatin1String("QT_AUTO_SCREEN_SCALE_FACTOR"), QLatin1String("1"));
|
||||
environment.set("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
const QString controlsStyle = m_designerSettings.value(DesignerSettingsKey::
|
||||
@@ -443,12 +427,12 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
const QString controlsStyle;
|
||||
#endif
|
||||
if (!controlsStyle.isEmpty() && controlsStyle != "Default") {
|
||||
environment.set(QLatin1String("QT_QUICK_CONTROLS_STYLE"), controlsStyle);
|
||||
environment.set(QLatin1String("QT_LABS_CONTROLS_STYLE"), controlsStyle);
|
||||
environment.set("QT_QUICK_CONTROLS_STYLE", controlsStyle);
|
||||
environment.set("QT_LABS_CONTROLS_STYLE", controlsStyle);
|
||||
}
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
environment.set(QLatin1String("FORMEDITOR_DEVICE_PIXEL_RATIO"), QString::number(QmlDesignerPlugin::formEditorDevicePixelRatio()));
|
||||
environment.set("FORMEDITOR_DEVICE_PIXEL_RATIO", QString::number(QmlDesignerPlugin::formEditorDevicePixelRatio()));
|
||||
#endif
|
||||
|
||||
const QString styleConfigFileName = getStyleConfigFileName();
|
||||
@@ -457,11 +441,11 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
* but we can manually at least set the correct style. */
|
||||
if (!styleConfigFileName.isEmpty()) {
|
||||
QSettings infiFile(styleConfigFileName, QSettings::IniFormat);
|
||||
environment.set(QLatin1String("QT_QUICK_CONTROLS_STYLE"), infiFile.value("Controls/Style", "Default").toString());
|
||||
environment.set("QT_QUICK_CONTROLS_STYLE", infiFile.value("Controls/Style", "Default").toString());
|
||||
}
|
||||
|
||||
if (!m_qrcMapping.isEmpty()) {
|
||||
environment.set(QLatin1String("QMLDESIGNER_RC_PATHS"), m_qrcMapping);
|
||||
environment.set("QMLDESIGNER_RC_PATHS", m_qrcMapping);
|
||||
}
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
QmlDesignerPlugin::instance()->viewManager().nodeInstanceView()->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)});
|
||||
@@ -477,7 +461,7 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
environment.appendOrSet("QT_QUICK_CONTROLS_CONF", styleConfigFileName);
|
||||
|
||||
if (m_currentProject) {
|
||||
QmakeProjectManager::QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(m_currentProject);
|
||||
auto qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(m_currentProject);
|
||||
if (qmakeProject) {
|
||||
QStringList designerImports = qmakeProject->rootProjectNode()->variableValue(QmakeProjectManager::Variable::QmlDesignerImportPath);
|
||||
importPaths.append(designerImports);
|
||||
@@ -521,11 +505,6 @@ QString PuppetCreator::qmakeCommand() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString PuppetCreator::compileLog() const
|
||||
{
|
||||
return m_compileLog;
|
||||
}
|
||||
|
||||
void PuppetCreator::setQrcMappingString(const QString qrcMapping)
|
||||
{
|
||||
m_qrcMapping = qrcMapping;
|
||||
@@ -539,7 +518,7 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath,
|
||||
if (command.isEmpty())
|
||||
return false;
|
||||
|
||||
const QString errorOutputFilePath(buildDirectoryPath + QLatin1String("/build_error_output.txt"));
|
||||
const QString errorOutputFilePath(buildDirectoryPath + "/build_error_output.txt");
|
||||
if (QFile::exists(errorOutputFilePath))
|
||||
QFile(errorOutputFilePath).remove();
|
||||
progressDialog->setErrorOutputFile(errorOutputFilePath);
|
||||
@@ -569,6 +548,7 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath,
|
||||
|
||||
qCInfo(puppetBuild) << Q_FUNC_INFO;
|
||||
qCInfo(puppetBuild) << m_compileLog;
|
||||
m_compileLog.clear();
|
||||
|
||||
if (process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0)
|
||||
return true;
|
||||
@@ -578,17 +558,12 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath,
|
||||
|
||||
QString PuppetCreator::puppetSourceDirectoryPath()
|
||||
{
|
||||
return Core::ICore::resourcePath() + QStringLiteral("/qml/qmlpuppet");
|
||||
return Core::ICore::resourcePath() + "/qml/qmlpuppet";
|
||||
}
|
||||
|
||||
QString PuppetCreator::qml2PuppetProjectFile()
|
||||
{
|
||||
return puppetSourceDirectoryPath() + QStringLiteral("/qml2puppet/qml2puppet.pro");
|
||||
}
|
||||
|
||||
QString PuppetCreator::qmlPuppetProjectFile()
|
||||
{
|
||||
return puppetSourceDirectoryPath() + QStringLiteral("/qmlpuppet/qmlpuppet.pro");
|
||||
return puppetSourceDirectoryPath() + "/qml2puppet/qml2puppet.pro";
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkPuppetIsReady(const QString &puppetPath) const
|
||||
@@ -603,11 +578,6 @@ bool PuppetCreator::checkPuppetIsReady(const QString &puppetPath) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkQml2PuppetIsReady() const
|
||||
{
|
||||
return checkPuppetIsReady(qml2PuppetPath(UserSpacePuppet));
|
||||
}
|
||||
|
||||
static bool nonEarlyQt5Version(const QtSupport::QtVersionNumber ¤tQtVersionNumber)
|
||||
{
|
||||
return currentQtVersionNumber >= QtSupport::QtVersionNumber(5, 2, 0) || currentQtVersionNumber < QtSupport::QtVersionNumber(5, 0, 0);
|
||||
@@ -620,23 +590,7 @@ bool PuppetCreator::qtIsSupported() const
|
||||
return currentQtVersion
|
||||
&& currentQtVersion->isValid()
|
||||
&& nonEarlyQt5Version(currentQtVersion->qtVersion())
|
||||
&& currentQtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
|
||||
}
|
||||
|
||||
bool PuppetCreator::checkPuppetVersion(const QString &qmlPuppetPath)
|
||||
{
|
||||
|
||||
QProcess qmlPuppetVersionProcess;
|
||||
qmlPuppetVersionProcess.start(qmlPuppetPath, {"--version"});
|
||||
qmlPuppetVersionProcess.waitForReadyRead(6000);
|
||||
|
||||
QByteArray versionString = qmlPuppetVersionProcess.readAll();
|
||||
|
||||
bool canConvert;
|
||||
unsigned int versionNumber = versionString.toUInt(&canConvert);
|
||||
|
||||
return canConvert && versionNumber == 2;
|
||||
|
||||
&& currentQtVersion->type() == QtSupport::Constants::DESKTOPQT;
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Project;
|
||||
}
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -52,12 +52,9 @@ public:
|
||||
|
||||
PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const QString &qtCreatorVersion,
|
||||
const Model *model);
|
||||
|
||||
~PuppetCreator();
|
||||
|
||||
void createPuppetExecutableIfMissing();
|
||||
void createQml2PuppetExecutableIfMissing();
|
||||
|
||||
QProcess *createPuppetProcess(const QString &puppetMode,
|
||||
const QString &socketToken,
|
||||
@@ -65,8 +62,6 @@ public:
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const;
|
||||
|
||||
QString compileLog() const;
|
||||
|
||||
void setQrcMappingString(const QString qrcMapping);
|
||||
|
||||
static QString defaultPuppetToplevelBuildDirectory();
|
||||
@@ -74,7 +69,6 @@ public:
|
||||
protected:
|
||||
bool build(const QString &qmlPuppetProjectFilePath) const;
|
||||
|
||||
void createQml2PuppetExecutableIfMissing();
|
||||
|
||||
QString qmlPuppetToplevelBuildDirectory() const;
|
||||
QString qmlPuppetFallbackDirectory() const;
|
||||
@@ -84,15 +78,12 @@ protected:
|
||||
bool startBuildProcess(const QString &buildDirectoryPath,
|
||||
const QString &command,
|
||||
const QStringList &processArguments = QStringList(),
|
||||
PuppetBuildProgressDialog *progressDialog = 0) const;
|
||||
PuppetBuildProgressDialog *progressDialog = nullptr) const;
|
||||
static QString puppetSourceDirectoryPath();
|
||||
static QString qml2PuppetProjectFile();
|
||||
static QString qmlPuppetProjectFile();
|
||||
|
||||
bool checkPuppetIsReady(const QString &puppetPath) const;
|
||||
bool checkQml2PuppetIsReady() const;
|
||||
bool qtIsSupported() const;
|
||||
static bool checkPuppetVersion(const QString &qmlPuppetPath);
|
||||
QProcess *puppetProcess(const QString &puppetPath,
|
||||
const QString &workingDirectory,
|
||||
const QString &puppetMode,
|
||||
@@ -114,12 +105,11 @@ protected:
|
||||
QString getStyleConfigFileName() const;
|
||||
|
||||
private:
|
||||
QString m_qtCreatorVersion;
|
||||
mutable QString m_compileLog;
|
||||
ProjectExplorer::Kit *m_kit;
|
||||
ProjectExplorer::Kit *m_kit = nullptr;
|
||||
PuppetType m_availablePuppetType;
|
||||
static QHash<Core::Id, PuppetType> m_qml2PuppetForKitPuppetHash;
|
||||
const Model *m_model;
|
||||
const Model *m_model = nullptr;
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
const DesignerSettings m_designerSettings;
|
||||
#endif
|
||||
|
||||
@@ -291,7 +291,6 @@ void QnxAttachDebugSupport::showProcessesDialog()
|
||||
auto debugger = new QnxAttachDebugSupport(runControl);
|
||||
debugger->setStartMode(AttachToRemoteServer);
|
||||
debugger->setCloseMode(DetachAtClose);
|
||||
debugger->setNeedFixup(false);
|
||||
debugger->setSymbolFile(localExecutable);
|
||||
debugger->setUseCtrlCStub(true);
|
||||
debugger->setAttachPid(pid);
|
||||
|
||||
@@ -205,6 +205,8 @@ IAssistProposal *KeywordsCompletionAssistProcessor::perform(const AssistInterfac
|
||||
|
||||
if (m_keywords.isFunction(word) && interface->characterAt(pos) == '(') {
|
||||
QStringList functionSymbols = m_keywords.argsForFunction(word);
|
||||
if (functionSymbols.size() == 0)
|
||||
return nullptr;
|
||||
IFunctionHintProposalModel *model = new KeywordsFunctionHintModel(functionSymbols);
|
||||
return new FunctionHintProposal(startPosition, model);
|
||||
} else {
|
||||
|
||||
@@ -164,8 +164,8 @@ void UpdateInfoPlugin::checkForUpdatesFinished()
|
||||
|
||||
if (!document.isNull() && document.firstChildElement().hasChildNodes()) {
|
||||
emit newUpdatesAvailable(true);
|
||||
if (QMessageBox::question(0, tr("Updater"),
|
||||
tr("New updates are available. Do you want to start update?"))
|
||||
if (QMessageBox::question(ICore::dialogParent(), tr("Qt Updater"),
|
||||
tr("New updates are available. Do you want to start the update?"))
|
||||
== QMessageBox::Yes)
|
||||
startUpdater();
|
||||
} else {
|
||||
|
||||
@@ -18,7 +18,6 @@ HEADERS += \
|
||||
callgrindtool.h \
|
||||
callgrindvisualisation.h \
|
||||
callgrindengine.h \
|
||||
workarounds.h \
|
||||
callgrindtextmark.h \
|
||||
memchecktool.h \
|
||||
memcheckerrorview.h \
|
||||
@@ -37,7 +36,6 @@ SOURCES += \
|
||||
callgrindtool.cpp \
|
||||
callgrindvisualisation.cpp \
|
||||
callgrindengine.cpp \
|
||||
workarounds.cpp \
|
||||
callgrindtextmark.cpp \
|
||||
memchecktool.cpp \
|
||||
memcheckerrorview.cpp \
|
||||
|
||||
@@ -36,7 +36,6 @@ QtcPlugin {
|
||||
"valgrindplugin.cpp", "valgrindplugin.h",
|
||||
"valgrindrunner.cpp", "valgrindrunner.h",
|
||||
"valgrindsettings.cpp", "valgrindsettings.h",
|
||||
"workarounds.cpp", "workarounds.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "workarounds.h"
|
||||
|
||||
#include <QPalette>
|
||||
|
||||
#include <utils/stylehelper.h>
|
||||
|
||||
QPalette panelPalette(const QPalette &oldPalette, bool lightColored)
|
||||
{
|
||||
QColor color = Utils::StyleHelper::panelTextColor(lightColored);
|
||||
QPalette pal = oldPalette;
|
||||
pal.setBrush(QPalette::All, QPalette::WindowText, color);
|
||||
pal.setBrush(QPalette::All, QPalette::ButtonText, color);
|
||||
pal.setBrush(QPalette::All, QPalette::Foreground, color);
|
||||
color.setAlpha(100);
|
||||
pal.setBrush(QPalette::Disabled, QPalette::WindowText, color);
|
||||
pal.setBrush(QPalette::Disabled, QPalette::ButtonText, color);
|
||||
pal.setBrush(QPalette::Disabled, QPalette::Foreground, color);
|
||||
return pal;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QPalette;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
///FIXME: remove this once https://bugreports.qt.io/browse/QTCREATORBUG-3247 gets fixed
|
||||
QPalette panelPalette(const QPalette &oldPalette, bool lightColored = false);
|
||||
+1
-1
Submodule src/shared/qbs updated: 83f43f57ac...07fa68a352
@@ -35,6 +35,7 @@ Project {
|
||||
qbsBaseDir + "/src/plugins/plugins.qbs",
|
||||
qbsBaseDir + "/share/share.qbs",
|
||||
qbsBaseDir + "/src/app/apps.qbs",
|
||||
qbsBaseDir + "/src/shared/json/json.qbs",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user