forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts: src/plugins/qmljstools/qmlconsoleitemdelegate.cpp src/plugins/qmlprofiler/qmlprofilerengine.cpp Change-Id: I95c2c4116e28683fafcc0a557a7913d67361dcd4
This commit is contained in:
@@ -14434,12 +14434,12 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
<message>
|
||||
<source>%1 Debug</source>
|
||||
<extracomment>Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 调试</translation>
|
||||
<translation">%1 Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Release</source>
|
||||
<extracomment>Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 发布</translation>
|
||||
<translation>%1 Release</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><No tool chain selected></source>
|
||||
@@ -22774,7 +22774,7 @@ S60 emulator run configuration default display name, %1 is base pro-File name</e
|
||||
<message>
|
||||
<source>untitled</source>
|
||||
<extracomment>File path suggestion for a new project. If you choose to translate it, make sure it is a valid path name without blanks and using only ascii chars.</extracomment>
|
||||
<translation>未命名</translation>
|
||||
<translation>untitled</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -27898,12 +27898,12 @@ Did you start Qemu?</source>
|
||||
<message>
|
||||
<source>%1 Debug</source>
|
||||
<extracomment>Debug build configuration. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 调试</translation>
|
||||
<translation>%1 Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Release</source>
|
||||
<extracomment>Release build configuration. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 发布</translation>
|
||||
<translation>%1 Release</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -40001,12 +40001,12 @@ Check if the phone is connected and App TRK is running.</source>
|
||||
<message>
|
||||
<source>%1 Debug</source>
|
||||
<extracomment>Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 调试</translation>
|
||||
<translation>%1 Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Release</source>
|
||||
<extracomment>Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it.</extracomment>
|
||||
<translation type="obsolete">%1 发布</translation>
|
||||
<translation>%1 Release</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -206,6 +206,9 @@ void AndroidConfig::save(QSettings &settings) const
|
||||
settings.setValue(PartitionSizeKey, partitionSize);
|
||||
settings.setValue(AutomaticKitCreationKey, automaticKitCreation);
|
||||
settings.setValue(ToolchainHostKey, toolchainHost);
|
||||
settings.setValue(MakeExtraSearchDirectory,
|
||||
makeExtraSearchDirectories.isEmpty() ? QString()
|
||||
: makeExtraSearchDirectories.at(0));
|
||||
}
|
||||
|
||||
void AndroidConfigurations::setConfig(const AndroidConfig &devConfigs)
|
||||
|
||||
@@ -572,19 +572,20 @@ void AndroidManager::updateTarget(ProjectExplorer::Target *target, const QString
|
||||
bool modified = false;
|
||||
bool comment = false;
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
if (lines[i].contains("@ANDROID-")) {
|
||||
commentLines = targetSDKNumber < lines[i].mid(lines[i].lastIndexOf('-') + 1).toInt();
|
||||
QByteArray trimmed = lines[i].trimmed();
|
||||
if (trimmed.contains("@ANDROID-")) {
|
||||
commentLines = targetSDKNumber < trimmed.mid(trimmed.lastIndexOf('-') + 1).toInt();
|
||||
comment = !comment;
|
||||
continue;
|
||||
}
|
||||
if (!comment)
|
||||
continue;
|
||||
if (commentLines) {
|
||||
if (!lines[i].trimmed().startsWith("//QtCreator")) {
|
||||
if (!trimmed.startsWith("//QtCreator")) {
|
||||
lines[i] = "//QtCreator " + lines[i];
|
||||
modified = true;
|
||||
}
|
||||
} else { if (lines[i].trimmed().startsWith("//QtCreator")) {
|
||||
} else { if (trimmed.startsWith("//QtCreator")) {
|
||||
lines[i] = lines[i].mid(12);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
@@ -3024,6 +3024,8 @@ void ProjectExplorerPlugin::setSession(QAction *action)
|
||||
|
||||
void ProjectExplorerPlugin::setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes)
|
||||
{
|
||||
QTC_ASSERT(d->m_projectExplorerSettings.environmentId == pes.environmentId, return);
|
||||
|
||||
if (d->m_projectExplorerSettings == pes)
|
||||
return;
|
||||
d->m_projectExplorerSettings = pes;
|
||||
|
||||
@@ -81,7 +81,8 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS
|
||||
&& p1.useJom == p2.useJom
|
||||
&& p1.autorestoreLastSession == p2.autorestoreLastSession
|
||||
&& p1.prompToStopRunControl == p2.prompToStopRunControl
|
||||
&& p1.maxAppOutputLines == p2.maxAppOutputLines;
|
||||
&& p1.maxAppOutputLines == p2.maxAppOutputLines
|
||||
&& p1.environmentId == p2.environmentId;
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -80,10 +80,11 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
|
||||
pes.useJom = m_ui.jomCheckbox->isChecked();
|
||||
pes.prompToStopRunControl = m_ui.promptToStopRunControlCheckBox->isChecked();
|
||||
pes.maxAppOutputLines = m_ui.maxAppOutputBox->value();
|
||||
pes.environmentId = m_environmentId;
|
||||
return pes;
|
||||
}
|
||||
|
||||
void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &pes) const
|
||||
void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &pes)
|
||||
{
|
||||
m_ui.buildProjectBeforeDeployCheckBox->setChecked(pes.buildBeforeDeploy);
|
||||
m_ui.deployProjectBeforeRunCheckBox->setChecked(pes.deployBeforeRun);
|
||||
@@ -97,6 +98,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &
|
||||
m_ui.jomCheckbox->setChecked(pes.useJom);
|
||||
m_ui.promptToStopRunControlCheckBox->setChecked(pes.prompToStopRunControl);
|
||||
m_ui.maxAppOutputBox->setValue(pes.maxAppOutputLines);
|
||||
m_environmentId = pes.environmentId;
|
||||
}
|
||||
|
||||
QString ProjectExplorerSettingsWidget::projectsDirectory() const
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "ui_projectexplorersettingspage.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QUuid>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
@@ -47,7 +48,7 @@ public:
|
||||
explicit ProjectExplorerSettingsWidget(QWidget *parent = 0);
|
||||
|
||||
ProjectExplorerSettings settings() const;
|
||||
void setSettings(const ProjectExplorerSettings &s) const;
|
||||
void setSettings(const ProjectExplorerSettings &s);
|
||||
|
||||
QString projectsDirectory() const;
|
||||
void setProjectsDirectory(const QString &pd);
|
||||
@@ -70,6 +71,7 @@ private:
|
||||
|
||||
Ui::ProjectExplorerSettingsPageUi m_ui;
|
||||
mutable QString m_searchKeywords;
|
||||
QUuid m_environmentId;
|
||||
};
|
||||
|
||||
class ProjectExplorerSettingsPage : public Core::IOptionsPage
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <QTreeView>
|
||||
#include <QScrollBar>
|
||||
#include <QTextLayout>
|
||||
#include <QUrl>
|
||||
|
||||
const char CONSOLE_LOG_BACKGROUND_COLOR[] = "#E8EEF2";
|
||||
const char CONSOLE_WARNING_BACKGROUND_COLOR[] = "#F6F4EB";
|
||||
@@ -216,6 +217,9 @@ void QmlConsoleItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||
if (showFileLineInfo) {
|
||||
// Check for file info
|
||||
QString file = index.data(QmlConsoleItemModel::FileRole).toString();
|
||||
const QUrl fileUrl = QUrl(file);
|
||||
if (fileUrl.isLocalFile())
|
||||
file = fileUrl.toLocalFile();
|
||||
if (!file.isEmpty()) {
|
||||
QFontMetrics fm(option.font);
|
||||
// Paint FileArea
|
||||
|
||||
@@ -225,8 +225,10 @@ void QmlConsoleView::onRowActivated(const QModelIndex &index)
|
||||
return;
|
||||
|
||||
// See if we have file and line Info
|
||||
QString filePath = model()->data(index,
|
||||
QmlConsoleItemModel::FileRole).toString();
|
||||
QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString();
|
||||
const QUrl fileUrl = QUrl(filePath);
|
||||
if (fileUrl.isLocalFile())
|
||||
filePath = fileUrl.toLocalFile();
|
||||
if (!filePath.isEmpty()) {
|
||||
QFileInfo fi(filePath);
|
||||
if (fi.exists() && fi.isFile() && fi.isReadable()) {
|
||||
@@ -244,6 +246,9 @@ void QmlConsoleView::copyToClipboard(const QModelIndex &index)
|
||||
QString contents = model()->data(index, QmlConsoleItemModel::ExpressionRole).toString();
|
||||
// See if we have file and line Info
|
||||
QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString();
|
||||
const QUrl fileUrl = QUrl(filePath);
|
||||
if (fileUrl.isLocalFile())
|
||||
filePath = fileUrl.toLocalFile();
|
||||
if (!filePath.isEmpty()) {
|
||||
contents = QString(QLatin1String("%1 %2: %3")).arg(contents).arg(filePath).arg(
|
||||
model()->data(index, QmlConsoleItemModel::LineRole).toString());
|
||||
@@ -259,6 +264,9 @@ bool QmlConsoleView::canShowItemInTextEditor(const QModelIndex &index)
|
||||
|
||||
// See if we have file and line Info
|
||||
QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString();
|
||||
const QUrl fileUrl = QUrl(filePath);
|
||||
if (fileUrl.isLocalFile())
|
||||
filePath = fileUrl.toLocalFile();
|
||||
if (!filePath.isEmpty()) {
|
||||
QFileInfo fi(filePath);
|
||||
if (fi.exists() && fi.isFile() && fi.isReadable())
|
||||
|
||||
@@ -65,7 +65,7 @@ class QmlProfilerEngine::QmlProfilerEnginePrivate
|
||||
{
|
||||
public:
|
||||
QmlProfilerEnginePrivate(QmlProfilerEngine *qq, const AnalyzerStartParameters &sp) : q(qq), m_runner(0), sp(sp) {}
|
||||
~QmlProfilerEnginePrivate() { delete m_runner; }
|
||||
~QmlProfilerEnginePrivate() { m_runner->disconnect(); delete m_runner; }
|
||||
|
||||
bool attach(const QString &address, uint port);
|
||||
AbstractQmlProfilerRunner *createRunner(ProjectExplorer::RunConfiguration *runConfiguration,
|
||||
@@ -161,6 +161,7 @@ bool QmlProfilerEngine::start()
|
||||
QTC_ASSERT(d->m_profilerState, return false);
|
||||
|
||||
if (d->m_runner) {
|
||||
d->m_runner->disconnect();
|
||||
delete d->m_runner;
|
||||
d->m_runner = 0;
|
||||
}
|
||||
@@ -377,6 +378,7 @@ void QmlProfilerEngine::profilerStateChanged()
|
||||
// (a new one will be created at start)
|
||||
d->m_noDebugOutputTimer.stop();
|
||||
if (d->m_runner) {
|
||||
d->m_runner->disconnect();
|
||||
delete d->m_runner;
|
||||
d->m_runner = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user