Merge remote-tracking branch 'origin/master' into 4.10

Change-Id: I5a89266071d018d23cd9e06144e91af03e95908a
This commit is contained in:
Eike Ziller
2019-06-04 14:44:03 +02:00
13 changed files with 44 additions and 36 deletions

View File

@@ -124,9 +124,8 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
set(_arg_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
endif()
_doc_find_program(_qhelpgenerator NAMES qhelpgenerator qhelpgenerator-qt5)
if (_qhelpgenerator STREQUAL "_qhelpgenerator-NOTFOUND")
message(WARNING "No qhelpgenerator binary found: No QCH documentation targets were generated")
if (NOT TARGET Qt5::qhelpgenerator)
message(WARNING "qhelpgenerator missing: No QCH documentation targets were generated")
return()
endif()
@@ -138,7 +137,7 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
set(_qch_target "qch_docs_${_target}")
set(_html_target "html_docs_${_target}")
add_custom_target("${_qch_target}"
"${_qhelpgenerator}" "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch"
Qt5::qhelpgenerator "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch"
COMMENT "Build QCH documentation from ${_qdocconf_file}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
VERBATIM

View File

@@ -39,7 +39,7 @@ enum QmlDebugServicesPreset {
QmlPreviewServices
};
static inline QString qmlDebugServices(QmlDebugServicesPreset preset)
inline QString qmlDebugServices(QmlDebugServicesPreset preset)
{
switch (preset) {
case NoQmlDebugServices:
@@ -58,7 +58,7 @@ static inline QString qmlDebugServices(QmlDebugServicesPreset preset)
}
}
static inline QString qmlDebugCommandLineArguments(QmlDebugServicesPreset services,
inline QString qmlDebugCommandLineArguments(QmlDebugServicesPreset services,
const QString &connectionMode, bool block)
{
if (services == NoQmlDebugServices)
@@ -68,19 +68,19 @@ static inline QString qmlDebugCommandLineArguments(QmlDebugServicesPreset servic
.arg(QLatin1String(block ? ",block" : "")).arg(qmlDebugServices(services));
}
static inline QString qmlDebugTcpArguments(QmlDebugServicesPreset services,
Utils::Port port, bool block = true)
inline QString qmlDebugTcpArguments(QmlDebugServicesPreset services,
Utils::Port port, bool block = true)
{
return qmlDebugCommandLineArguments(services, QString("port:%1").arg(port.number()), block);
}
static inline QString qmlDebugNativeArguments(QmlDebugServicesPreset services, bool block = true)
inline QString qmlDebugNativeArguments(QmlDebugServicesPreset services, bool block = true)
{
return qmlDebugCommandLineArguments(services, QLatin1String("native"), block);
}
static inline QString qmlDebugLocalArguments(QmlDebugServicesPreset services, const QString &socket,
bool block = true)
inline QString qmlDebugLocalArguments(QmlDebugServicesPreset services, const QString &socket,
bool block = true)
{
return qmlDebugCommandLineArguments(services, QLatin1String("file:") + socket, block);
}

View File

@@ -186,7 +186,7 @@ void filteredFlags(const QString &fileName,
if (flag.startsWith("--sysroot=")) {
if (sysRoot.isEmpty())
sysRoot = flag.mid(10);
sysRoot = updatedPathFlag(flag.mid(10), workingDir);
continue;
}

View File

@@ -150,7 +150,7 @@ public:
Runnable runnable;
bool breakAtMain = false;
bool runInTerminal = false;
QString serverStartScript;
FilePath serverStartScript;
QString debugInfoLocation;
};
@@ -198,7 +198,7 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory);
settings->setValue("LastExternalBreakAtMain", breakAtMain);
settings->setValue("LastExternalRunInTerminal", runInTerminal);
settings->setValue("LastServerStartScript", serverStartScript);
settings->setValue("LastServerStartScript", serverStartScript.toVariant());
settings->setValue("LastDebugInfoLocation", debugInfoLocation);
}
@@ -212,7 +212,7 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
runnable.workingDirectory = settings->value("LastExternalWorkingDirectory").toString();
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
serverStartScript = settings->value("LastServerStartScript").toString();
serverStartScript = FilePath::fromVariant(settings->value("LastServerStartScript"));
debugInfoLocation = settings->value("LastDebugInfoLocation").toString();
}
@@ -475,7 +475,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
result.serverPort = d->serverPortSpinBox->value();
result.serverAddress = d->channelOverrideEdit->text();
result.runnable.executable = d->localExecutablePathChooser->path();
result.serverStartScript = d->serverStartScriptPathChooser->path();
result.serverStartScript = d->serverStartScriptPathChooser->fileName();
result.kitId = d->kitChooser->currentKitId();
result.debugInfoLocation = d->debuginfoPathChooser->path();
result.runnable.commandLineArguments = d->arguments->text();
@@ -491,7 +491,7 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
d->serverPortSpinBox->setValue(p.serverPort);
d->channelOverrideEdit->setText(p.serverAddress);
d->localExecutablePathChooser->setPath(p.runnable.executable);
d->serverStartScriptPathChooser->setPath(p.serverStartScript);
d->serverStartScriptPathChooser->setFileName(p.serverStartScript);
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
d->arguments->setText(p.runnable.commandLineArguments);
d->workingDirectory->setPath(p.runnable.workingDirectory);

View File

@@ -98,8 +98,8 @@ class LocalProcessRunner : public RunWorker
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::LocalProcessRunner)
public:
LocalProcessRunner(DebuggerRunTool *runTool, const Runnable &runnable)
: RunWorker(runTool->runControl()), m_runTool(runTool), m_runnable(runnable)
LocalProcessRunner(DebuggerRunTool *runTool, const CommandLine &command)
: RunWorker(runTool->runControl()), m_runTool(runTool), m_command(command)
{
connect(&m_proc, &QProcess::errorOccurred,
this, &LocalProcessRunner::handleError);
@@ -113,7 +113,7 @@ public:
void start() override
{
m_proc.setCommand(m_runnable.commandLine());
m_proc.setCommand(m_command);
m_proc.start();
}
@@ -181,7 +181,7 @@ public:
}
QPointer<DebuggerRunTool> m_runTool;
Runnable m_runnable;
CommandLine m_command;
Utils::QtcProcess m_proc;
};
@@ -400,14 +400,12 @@ void DebuggerRunTool::setCommandsForReset(const QString &commands)
m_runParameters.commandsForReset = commands;
}
void DebuggerRunTool::setServerStartScript(const QString &serverStartScript)
void DebuggerRunTool::setServerStartScript(const FilePath &serverStartScript)
{
if (!serverStartScript.isEmpty()) {
// Provide script information about the environment
Runnable serverStarter;
serverStarter.executable = serverStartScript;
QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.inferior.executable);
QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.remoteChannel);
CommandLine serverStarter(serverStartScript, {});
serverStarter.addArgs({m_runParameters.inferior.executable, m_runParameters.remoteChannel});
addStartDependency(new LocalProcessRunner(this, serverStarter));
}
}

View File

@@ -110,7 +110,7 @@ public:
void setCommandsAfterConnect(const QString &commands);
void setCommandsForReset(const QString &commands);
void setServerStartScript(const QString &serverStartScript);
void setServerStartScript(const Utils::FilePath &serverStartScript);
void setDebugInfoLocation(const QString &debugInfoLocation);
void setQmlServer(const QUrl &qmlServer);

View File

@@ -299,11 +299,12 @@ void PythonRunConfiguration::updateTargetInformation()
Runnable PythonRunConfiguration::runnable() const
{
CommandLine cmd{executable(), {}};
cmd.addArg(mainScript());
cmd.addArgs(aspect<ArgumentsAspect>()->arguments(macroExpander()));
Runnable r;
QtcProcess::addArg(&r.commandLineArguments, mainScript());
QtcProcess::addArgs(&r.commandLineArguments,
aspect<ArgumentsAspect>()->arguments(macroExpander()));
r.executable = executable().toString();
r.setCommandLine(cmd);
r.environment = aspect<EnvironmentAspect>()->environment();
return r;
}

View File

@@ -80,7 +80,7 @@ Image {
width: 270
height: 24
color: "#ffffff"
text: qsTr("Copyright 2008 - 2018 The Qt Company")
text: qsTr("Copyright 2008 - 2019 The Qt Company")
font.pixelSize: 16
font.family: StudioFonts.titilliumWeb_light
}

View File

@@ -39,7 +39,7 @@ Project {
directory: "."
}
/* List of plugin directories passed to QML runtime */
importPaths: [ "../../../../share/3rdparty/studiofonts" ]
importPaths: [ "imports", "mockData", "../../../../share/3rdparty/studiofonts" ]
Environment {
QT_AUTO_SCREEN_SCALE_FACTOR: "1"

View File

@@ -189,6 +189,12 @@ bool StudioWelcomePlugin::initialize(const QStringList &arguments, QString *erro
qmlRegisterType<ProjectModel>("projectmodel", 1, 0, "ProjectModel");
m_welcomeMode = new WelcomeMode;
QFontDatabase fonts;
QFontDatabase::addApplicationFont(":/studiofonts/TitilliumWeb-Regular.ttf");
QFont systemFont("Titillium Web", QApplication::font().pointSize());
QApplication::setFont(systemFont);
return true;
}

View File

@@ -37,6 +37,7 @@ SOURCES += \
$$UTILS/qtcassert.cpp \
$$UTILS/qtcprocess.cpp \
$$UTILS/savefile.cpp \
$$UTILS/stringutils.cpp
HEADERS += \
addabiflavor.h \

View File

@@ -72,7 +72,8 @@ QtcTool {
"persistentsettings.cpp", "persistentsettings.h",
"qtcassert.cpp", "qtcassert.h",
"qtcprocess.cpp", "qtcprocess.h",
"savefile.cpp", "savefile.h"
"savefile.cpp", "savefile.h",
"stringutils.cpp"
]
}
Group {

View File

@@ -97,7 +97,8 @@ TEST_F(CompilationDatabaseUtils, FilterArguments)
QString::fromUtf8(HostOsInfo::isWindowsHost() ? winPath2 : otherPath2),
"-x",
"c++",
"--sysroot=C:\\sysroot\\embedded",
QString("--sysroot=") + (HostOsInfo::isWindowsHost()
? "C:\\sysroot\\embedded" : "/opt/sysroot/embedded"),
"C:\\qt-creator\\src\\plugins\\cpptools\\compileroptionsbuilder.cpp"},
"compileroptionsbuilder");
@@ -120,7 +121,8 @@ TEST_F(CompilationDatabaseUtils, FilterArguments)
{"RELATIVE_PLUGIN_PATH", "\"../lib/qtcreator/plugins\""},
{"QT_CREATOR", "1"}}));
ASSERT_THAT(fileKind, CppTools::ProjectFile::Kind::CXXSource);
ASSERT_THAT(sysRoot, QString("C:\\sysroot\\embedded"));
ASSERT_THAT(sysRoot, HostOsInfo::isWindowsHost() ? QString("C:\\sysroot\\embedded")
: QString("/opt/sysroot/embedded"));
}
static QString kCmakeCommand