forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
This commit is contained in:
@@ -325,9 +325,9 @@ void NodeInstanceServer::stopRenderTimer()
|
||||
|
||||
void NodeInstanceServer::createScene(const CreateSceneCommand &command)
|
||||
{
|
||||
initializeView();
|
||||
registerFonts(command.resourceUrl);
|
||||
setTranslationLanguage(command.language);
|
||||
initializeView();
|
||||
|
||||
Internal::QmlPrivateGate::stopUnifiedTimer();
|
||||
|
||||
@@ -1340,6 +1340,10 @@ void NodeInstanceServer::loadDummyContextObjectFile(const QFileInfo& qmlFileInfo
|
||||
|
||||
void NodeInstanceServer::setTranslationLanguage(const QString &language)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
// if there exists an /i18n directory it sets default translators
|
||||
engine()->setUiLanguage(language);
|
||||
#endif
|
||||
static QPointer<MultiLanguage::Translator> multilanguageTranslator;
|
||||
if (!MultiLanguage::databaseFilePath().isEmpty()) {
|
||||
if (!multilanguageLink) {
|
||||
|
@@ -46,9 +46,9 @@ Qt5PreviewNodeInstanceServer::Qt5PreviewNodeInstanceServer(NodeInstanceClientInt
|
||||
|
||||
void Qt5PreviewNodeInstanceServer::createScene(const CreateSceneCommand &command)
|
||||
{
|
||||
initializeView();
|
||||
registerFonts(command.resourceUrl);
|
||||
setTranslationLanguage(command.language);
|
||||
initializeView();
|
||||
setupScene(command);
|
||||
startRenderTimer();
|
||||
}
|
||||
|
@@ -118,9 +118,6 @@ public:
|
||||
, m_changed(changed)
|
||||
{
|
||||
updateErrorFlags();
|
||||
m_tooltip = tr("Version: %1<br>Supports fileApi: %2")
|
||||
.arg(QString::fromUtf8(item->version().fullVersion))
|
||||
.arg(item->hasFileApi() ? tr("yes") : tr("no"));
|
||||
}
|
||||
|
||||
CMakeToolTreeItem(const QString &name,
|
||||
@@ -146,6 +143,15 @@ public:
|
||||
m_pathExists = fi.exists();
|
||||
m_pathIsFile = fi.isFile();
|
||||
m_pathIsExecutable = fi.isExecutable();
|
||||
|
||||
CMakeTool cmake(m_autodetected ? CMakeTool::AutoDetection
|
||||
: CMakeTool::ManualDetection, m_id);
|
||||
cmake.setFilePath(m_executable);
|
||||
m_isSupported = cmake.hasFileApi();
|
||||
|
||||
m_tooltip = tr("Version: %1<br>Supports fileApi: %2")
|
||||
.arg(QString::fromUtf8(cmake.version().fullVersion))
|
||||
.arg(cmake.hasFileApi() ? tr("yes") : tr("no"));
|
||||
}
|
||||
|
||||
CMakeToolTreeItem() = default;
|
||||
|
@@ -1023,6 +1023,8 @@ void MainWindow::updateContextObject(const QList<IContext *> &context)
|
||||
void MainWindow::aboutToShutdown()
|
||||
{
|
||||
disconnect(qApp, &QApplication::focusChanged, this, &MainWindow::updateFocusWidget);
|
||||
for (auto contextPair : m_contextWidgets)
|
||||
disconnect(contextPair.second, &QObject::destroyed, this, nullptr);
|
||||
m_activeContext.clear();
|
||||
hide();
|
||||
}
|
||||
|
@@ -59,6 +59,8 @@ constexpr char kDisplayName[] = "displayName";
|
||||
constexpr char kField[] = "field";
|
||||
constexpr char kFields[] = "fields";
|
||||
constexpr char kGroupName[] = "groupName";
|
||||
constexpr char kLsb[] = "lsb";
|
||||
constexpr char kMsb[] = "msb";
|
||||
constexpr char kName[] = "name";
|
||||
constexpr char kPeripheral[] = "peripheral";
|
||||
constexpr char kPeripherals[] = "peripherals";
|
||||
@@ -566,6 +568,8 @@ PeripheralRegisterHandler::PeripheralRegisterHandler(DebuggerEngine *engine)
|
||||
static void handleField(QXmlStreamReader &in, PeripheralRegister ®)
|
||||
{
|
||||
PeripheralRegisterField fld;
|
||||
Utils::optional<int> from;
|
||||
Utils::optional<int> to;
|
||||
while (in.readNextStartElement()) {
|
||||
const auto elementName = in.name();
|
||||
if (elementName == QLatin1String(kName)) {
|
||||
@@ -593,11 +597,20 @@ static void handleField(QXmlStreamReader &in, PeripheralRegister ®)
|
||||
fld.bitOffset = int(decodeNumeric(in.readElementText()));
|
||||
} else if (elementName == QLatin1String(kBitWidth)) {
|
||||
fld.bitWidth = int(decodeNumeric(in.readElementText()));
|
||||
} else if (elementName == QLatin1String(kLsb)) {
|
||||
from = int(decodeNumeric(in.readElementText()));
|
||||
} else if (elementName == QLatin1String(kMsb)) {
|
||||
to = int(decodeNumeric(in.readElementText()));
|
||||
} else {
|
||||
in.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
||||
if (from && to) {
|
||||
fld.bitOffset = *from;
|
||||
fld.bitWidth = *to - *from + 1;
|
||||
}
|
||||
|
||||
// Inherit the field access from the register access if the filed
|
||||
// has not the access rights description.
|
||||
if (fld.access == PeripheralRegisterAccess::Unknown)
|
||||
|
@@ -559,13 +559,6 @@ FilePath McuSupportOptions::qulDirFromSettings()
|
||||
QSettings::UserScope));
|
||||
}
|
||||
|
||||
static FilePath jomExecutablePath()
|
||||
{
|
||||
return HostOsInfo::isWindowsHost()
|
||||
? FilePath::fromUserInput(Core::ICore::libexecPath() + "/jom.exe")
|
||||
: FilePath();
|
||||
}
|
||||
|
||||
static void setKitProperties(const QString &kitName, Kit *k, const McuTarget *mcuTarget)
|
||||
{
|
||||
using namespace Constants;
|
||||
@@ -585,8 +578,6 @@ static void setKitProperties(const QString &kitName, Kit *k, const McuTarget *mc
|
||||
QSet<Id> irrelevant = { SysRootKitAspect::id() };
|
||||
if (!kitNeedsQtVersion())
|
||||
irrelevant.insert(QtSupport::QtKitAspect::id());
|
||||
if (jomExecutablePath().exists()) // TODO: add id() getter to CMakeGeneratorKitAspect
|
||||
irrelevant.insert("CMake.GeneratorKitInformation");
|
||||
k->setIrrelevantAspects(irrelevant);
|
||||
}
|
||||
|
||||
@@ -690,11 +681,6 @@ static void setKitCMakeOptions(Kit *k, const McuTarget* mcuTarget, const QString
|
||||
if (mcuTarget->colorDepth() >= 0)
|
||||
config.append(CMakeConfigItem("QUL_COLOR_DEPTH",
|
||||
QString::number(mcuTarget->colorDepth()).toLatin1()));
|
||||
const FilePath jom = jomExecutablePath();
|
||||
if (jom.exists()) {
|
||||
config.append(CMakeConfigItem("CMAKE_MAKE_PROGRAM", jom.toString().toLatin1()));
|
||||
CMakeGeneratorKitAspect::setGenerator(k, "NMake Makefiles JOM");
|
||||
}
|
||||
if (kitNeedsQtVersion())
|
||||
config.append(CMakeConfigItem("CMAKE_PREFIX_PATH", "%{Qt:QT_INSTALL_PREFIX}"));
|
||||
CMakeConfigurationKitAspect::setConfiguration(k, config);
|
||||
|
@@ -121,7 +121,7 @@ QWidget *NinjaBuildStep::createConfigWidget()
|
||||
|
||||
connect(this, &NinjaBuildStep::commandChanged, this, updateDetails);
|
||||
|
||||
connect(this, &NinjaBuildStep::targetListChanged, this, updateTargetList);
|
||||
connect(this, &NinjaBuildStep::targetListChanged, widget, updateTargetList);
|
||||
|
||||
connect(toolArguments, &QLineEdit::textEdited, this, [this, updateDetails](const QString &text) {
|
||||
setCommandArgs(text);
|
||||
|
Reference in New Issue
Block a user