forked from qt-creator/qt-creator
Merge commit 'origin/1.0.0'
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
version=4.4.3
|
version="4.5-rc1"
|
||||||
workdir=/home/berlin/dev/qt-${version}-temp
|
workdir=/home/berlin/dev/qt-${version}-temp
|
||||||
destdir=/home/berlin/dev/qt-${version}-shipping/qt # "/qt" suffix for Bitrock
|
destdir=/home/berlin/dev/qt-${version}-shipping/qt # "/qt" suffix for Bitrock
|
||||||
dir=qt-x11-opensource-src-${version}
|
dir=qt-x11-opensource-src-${version}
|
||||||
|
@@ -185,7 +185,9 @@ void CodepasterPlugin::post()
|
|||||||
|
|
||||||
// Submit to codepaster
|
// Submit to codepaster
|
||||||
|
|
||||||
m_poster = new CustomPoster(serverUrl());
|
m_poster = new CustomPoster(serverUrl(),
|
||||||
|
m_settingsPage->copyToClipBoard(),
|
||||||
|
m_settingsPage->displayOutput());
|
||||||
|
|
||||||
// Copied from cpaster. Otherwise lineendings will screw up
|
// Copied from cpaster. Otherwise lineendings will screw up
|
||||||
if (!data.contains("\r\n")) {
|
if (!data.contains("\r\n")) {
|
||||||
|
@@ -65,8 +65,8 @@ public:
|
|||||||
QString username() const;
|
QString username() const;
|
||||||
QUrl serverUrl() const;
|
QUrl serverUrl() const;
|
||||||
|
|
||||||
bool copyToClipBoard() const;
|
inline bool copyToClipBoard() const { return m_copy; }
|
||||||
bool displayOutput() const;
|
inline bool displayOutput() const { return m_output; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_SettingsPage m_ui;
|
Ui_SettingsPage m_ui;
|
||||||
|
@@ -45,6 +45,8 @@
|
|||||||
#include <QtDesigner/QDesignerFormWindowInterface>
|
#include <QtDesigner/QDesignerFormWindowInterface>
|
||||||
#include <QtDesigner/QDesignerFormEditorInterface>
|
#include <QtDesigner/QDesignerFormEditorInterface>
|
||||||
#include <QtDesigner/QDesignerFormWindowManagerInterface>
|
#include <QtDesigner/QDesignerFormWindowManagerInterface>
|
||||||
|
#include <QtDesigner/QDesignerPropertyEditorInterface>
|
||||||
|
#include <QtDesigner/QDesignerWidgetDataBaseInterface>
|
||||||
#include <qt_private/formwindowbase_p.h>
|
#include <qt_private/formwindowbase_p.h>
|
||||||
#include <qt_private/qtresourcemodel_p.h>
|
#include <qt_private/qtresourcemodel_p.h>
|
||||||
|
|
||||||
@@ -325,3 +327,25 @@ void FormWindowEditor::activate()
|
|||||||
{
|
{
|
||||||
m_editorWidget->activate();
|
m_editorWidget->activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString FormWindowEditor::contextHelpId() const
|
||||||
|
{
|
||||||
|
// TODO [13.2.09]: Replace this by QDesignerIntegrations context help Id
|
||||||
|
// in the upcoming version of Qt
|
||||||
|
QDesignerFormEditorInterface *core = FormEditorW::instance()->designerEditor();
|
||||||
|
QObject *o = core->propertyEditor()->object();
|
||||||
|
if (!o)
|
||||||
|
return QString();
|
||||||
|
const QDesignerWidgetDataBaseInterface *db = core->widgetDataBase();
|
||||||
|
const int dbIndex = db->indexOfObject(o, true);
|
||||||
|
if (dbIndex == -1)
|
||||||
|
return QString();
|
||||||
|
QString className = db->item(dbIndex)->name();
|
||||||
|
if (className == QLatin1String("Line"))
|
||||||
|
className = QLatin1String("QFrame");
|
||||||
|
else if (className == QLatin1String("Spacer"))
|
||||||
|
className = QLatin1String("QSpacerItem");
|
||||||
|
else if (className == QLatin1String("QLayoutWidget"))
|
||||||
|
className = QLatin1String("QLayout");
|
||||||
|
return className;
|
||||||
|
}
|
||||||
|
@@ -63,7 +63,6 @@ class EditorWidget;
|
|||||||
class FormWindowEditor : public Core::IEditor
|
class FormWindowEditor : public Core::IEditor
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FormWindowEditor(const QList<int> &context,
|
FormWindowEditor(const QList<int> &context,
|
||||||
QDesignerFormWindowInterface *form,
|
QDesignerFormWindowInterface *form,
|
||||||
@@ -84,8 +83,9 @@ public:
|
|||||||
bool restoreState(const QByteArray &state);
|
bool restoreState(const QByteArray &state);
|
||||||
|
|
||||||
// ContextInterface
|
// ContextInterface
|
||||||
QList<int> context() const;
|
virtual QList<int> context() const;
|
||||||
QWidget *widget();
|
virtual QWidget *widget();
|
||||||
|
virtual QString contextHelpId() const;
|
||||||
|
|
||||||
QDesignerFormWindowInterface *formWindow() const;
|
QDesignerFormWindowInterface *formWindow() const;
|
||||||
QWidget *integrationContainer();
|
QWidget *integrationContainer();
|
||||||
|
@@ -207,20 +207,20 @@ void GitClient::diff(const QString &workingDirectory,
|
|||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("diff") << diffArgs;
|
arguments << QLatin1String("diff") << diffArgs;
|
||||||
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
||||||
command->addJob(arguments);
|
command->addJob(arguments, m_settings.timeout);
|
||||||
} else {
|
} else {
|
||||||
// Files diff.
|
// Files diff.
|
||||||
if (!unstagedFileNames.empty()) {
|
if (!unstagedFileNames.empty()) {
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("diff") << diffArgs << QLatin1String("--") << unstagedFileNames;
|
arguments << QLatin1String("diff") << diffArgs << QLatin1String("--") << unstagedFileNames;
|
||||||
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
||||||
command->addJob(arguments);
|
command->addJob(arguments, m_settings.timeout);
|
||||||
}
|
}
|
||||||
if (!stagedFileNames.empty()) {
|
if (!stagedFileNames.empty()) {
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("diff") << QLatin1String("--cached") << diffArgs << QLatin1String("--") << stagedFileNames;
|
arguments << QLatin1String("diff") << QLatin1String("--cached") << diffArgs << QLatin1String("--") << stagedFileNames;
|
||||||
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
m_plugin->outputWindow()->append(formatCommand(binary, arguments));
|
||||||
command->addJob(arguments);
|
command->addJob(arguments, m_settings.timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
command->execute();
|
command->execute();
|
||||||
@@ -503,7 +503,7 @@ void GitClient::executeGit(const QString &workingDirectory,
|
|||||||
{
|
{
|
||||||
m_plugin->outputWindow()->append(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments));
|
m_plugin->outputWindow()->append(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments));
|
||||||
GitCommand *command = createCommand(workingDirectory, editor, outputToWindow);
|
GitCommand *command = createCommand(workingDirectory, editor, outputToWindow);
|
||||||
command->addJob(arguments);
|
command->addJob(arguments, m_settings.timeout);
|
||||||
command->execute();
|
command->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,8 +55,9 @@ static inline QStringList environmentToList(const ProjectExplorer::Environment &
|
|||||||
return ProjectExplorer::Environment::systemEnvironment().toStringList();
|
return ProjectExplorer::Environment::systemEnvironment().toStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
GitCommand::Job::Job(const QStringList &a) :
|
GitCommand::Job::Job(const QStringList &a, int t) :
|
||||||
arguments(a)
|
arguments(a),
|
||||||
|
timeout(t)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,9 +68,9 @@ GitCommand::GitCommand(const QString &workingDirectory,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GitCommand::addJob(const QStringList &arguments)
|
void GitCommand::addJob(const QStringList &arguments, int timeout)
|
||||||
{
|
{
|
||||||
m_jobs.push_back(Job(arguments));
|
m_jobs.push_back(Job(arguments, timeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GitCommand::execute()
|
void GitCommand::execute()
|
||||||
@@ -109,7 +110,7 @@ void GitCommand::run()
|
|||||||
qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments;
|
qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments;
|
||||||
|
|
||||||
process.start(QLatin1String(Constants::GIT_BINARY), m_jobs.at(j).arguments);
|
process.start(QLatin1String(Constants::GIT_BINARY), m_jobs.at(j).arguments);
|
||||||
if (!process.waitForFinished()) {
|
if (!process.waitForFinished(m_jobs.at(j).timeout * 1000)) {
|
||||||
ok = false;
|
ok = false;
|
||||||
error += QLatin1String("Error: Git timed out");
|
error += QLatin1String("Error: Git timed out");
|
||||||
break;
|
break;
|
||||||
|
@@ -49,7 +49,7 @@ public:
|
|||||||
ProjectExplorer::Environment &environment);
|
ProjectExplorer::Environment &environment);
|
||||||
|
|
||||||
|
|
||||||
void addJob(const QStringList &arguments);
|
void addJob(const QStringList &arguments, int timeout);
|
||||||
void execute();
|
void execute();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -61,9 +61,10 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
struct Job {
|
struct Job {
|
||||||
explicit Job(const QStringList &a);
|
explicit Job(const QStringList &a, int t);
|
||||||
|
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
|
int timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
QStringList environment() const;
|
QStringList environment() const;
|
||||||
|
@@ -40,15 +40,17 @@ static const char *groupC = "Git";
|
|||||||
static const char *sysEnvKeyC = "SysEnv";
|
static const char *sysEnvKeyC = "SysEnv";
|
||||||
static const char *pathKeyC = "Path";
|
static const char *pathKeyC = "Path";
|
||||||
static const char *logCountKeyC = "LogCount";
|
static const char *logCountKeyC = "LogCount";
|
||||||
|
static const char *timeoutKeyC = "TimeOut";
|
||||||
|
|
||||||
enum { defaultLogCount = 10 };
|
enum { defaultLogCount = 10 , defaultTimeOut = 30};
|
||||||
|
|
||||||
namespace Git {
|
namespace Git {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
GitSettings::GitSettings() :
|
GitSettings::GitSettings() :
|
||||||
adoptPath(false),
|
adoptPath(false),
|
||||||
logCount(defaultLogCount)
|
logCount(defaultLogCount),
|
||||||
|
timeout(defaultTimeOut)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +60,7 @@ void GitSettings::fromSettings(QSettings *settings)
|
|||||||
adoptPath = settings->value(QLatin1String(sysEnvKeyC), false).toBool();
|
adoptPath = settings->value(QLatin1String(sysEnvKeyC), false).toBool();
|
||||||
path = settings->value(QLatin1String(pathKeyC), QString()).toString();
|
path = settings->value(QLatin1String(pathKeyC), QString()).toString();
|
||||||
logCount = settings->value(QLatin1String(logCountKeyC), defaultLogCount).toInt();
|
logCount = settings->value(QLatin1String(logCountKeyC), defaultLogCount).toInt();
|
||||||
|
timeout = settings->value(QLatin1String(timeoutKeyC), defaultTimeOut).toInt();
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,12 +70,13 @@ void GitSettings::toSettings(QSettings *settings) const
|
|||||||
settings->setValue(QLatin1String(sysEnvKeyC), adoptPath);
|
settings->setValue(QLatin1String(sysEnvKeyC), adoptPath);
|
||||||
settings->setValue(QLatin1String(pathKeyC), path);
|
settings->setValue(QLatin1String(pathKeyC), path);
|
||||||
settings->setValue(QLatin1String(logCountKeyC), logCount);
|
settings->setValue(QLatin1String(logCountKeyC), logCount);
|
||||||
|
settings->setValue(QLatin1String(timeoutKeyC), timeout);
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitSettings::equals(const GitSettings &s) const
|
bool GitSettings::equals(const GitSettings &s) const
|
||||||
{
|
{
|
||||||
return adoptPath == s.adoptPath && path == s.path && logCount == s.logCount;
|
return adoptPath == s.adoptPath && path == s.path && logCount == s.logCount && timeout == s.timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -56,6 +56,7 @@ struct GitSettings
|
|||||||
bool adoptPath;
|
bool adoptPath;
|
||||||
QString path;
|
QString path;
|
||||||
int logCount;
|
int logCount;
|
||||||
|
int timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const GitSettings &p1, const GitSettings &p2)
|
inline bool operator==(const GitSettings &p1, const GitSettings &p2)
|
||||||
|
@@ -52,6 +52,7 @@ GitSettings SettingsPageWidget::settings() const
|
|||||||
rc.path = m_ui.pathLineEdit->text();
|
rc.path = m_ui.pathLineEdit->text();
|
||||||
rc.adoptPath = m_ui.environmentGroupBox->isChecked() && !rc.path.isEmpty();
|
rc.adoptPath = m_ui.environmentGroupBox->isChecked() && !rc.path.isEmpty();
|
||||||
rc.logCount = m_ui.logCountSpinBox->value();
|
rc.logCount = m_ui.logCountSpinBox->value();
|
||||||
|
rc.timeout = m_ui.timeoutSpinBox->value();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ void SettingsPageWidget::setSettings(const GitSettings &s)
|
|||||||
m_ui.environmentGroupBox->setChecked(s.adoptPath);
|
m_ui.environmentGroupBox->setChecked(s.adoptPath);
|
||||||
m_ui.pathLineEdit->setText(s.path);
|
m_ui.pathLineEdit->setText(s.path);
|
||||||
m_ui.logCountSpinBox->setValue(s.logCount);
|
m_ui.logCountSpinBox->setValue(s.logCount);
|
||||||
|
m_ui.timeoutSpinBox->setValue(s.timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsPageWidget::setSystemPath()
|
void SettingsPageWidget::setSystemPath()
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>403</width>
|
<width>403</width>
|
||||||
<height>183</height>
|
<height>251</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -69,10 +69,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="logFormLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<item row="0" column="0">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<widget class="QLabel" name="logCountLabel">
|
||||||
</property>
|
<property name="text">
|
||||||
|
<string>Log commit display count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="logCountSpinBox">
|
<widget class="QSpinBox" name="logCountSpinBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@@ -83,10 +87,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="logCountLabel">
|
<widget class="QLabel" name="timeoutLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Log commit display count:</string>
|
<string>Timeout (seconds):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="timeoutSpinBox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>300</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>30</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@@ -241,12 +241,17 @@ void QtVersionManager::addNewVersionsFromInstaller()
|
|||||||
// or NewQtVersions="qt 4.3.2=c:\\qt\\qt432=c:\\qtcreator\\mingw\\=prependToPath;
|
// or NewQtVersions="qt 4.3.2=c:\\qt\\qt432=c:\\qtcreator\\mingw\\=prependToPath;
|
||||||
// Duplicate entries are not added, the first new version is set as default.
|
// Duplicate entries are not added, the first new version is set as default.
|
||||||
QSettings *settings = Core::ICore::instance()->settings();
|
QSettings *settings = Core::ICore::instance()->settings();
|
||||||
if (!settings->contains(newQtVersionsKey))
|
|
||||||
|
if (!settings->contains(newQtVersionsKey) &&
|
||||||
|
!settings->contains(QLatin1String("Installer/")+newQtVersionsKey))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// qDebug()<<"QtVersionManager::addNewVersionsFromInstaller()";
|
// qDebug()<<"QtVersionManager::addNewVersionsFromInstaller()";
|
||||||
|
|
||||||
QString newVersionsValue = settings->value(newQtVersionsKey).toString();
|
QString newVersionsValue = settings->value(newQtVersionsKey).toString();
|
||||||
|
if (newVersionsValue.isEmpty())
|
||||||
|
newVersionsValue = settings->value(QLatin1String("Installer/")+newQtVersionsKey).toString();
|
||||||
|
|
||||||
QStringList newVersionsList = newVersionsValue.split(';', QString::SkipEmptyParts);
|
QStringList newVersionsList = newVersionsValue.split(';', QString::SkipEmptyParts);
|
||||||
bool defaultVersionWasReset = false;
|
bool defaultVersionWasReset = false;
|
||||||
foreach (QString newVersion, newVersionsList) {
|
foreach (QString newVersion, newVersionsList) {
|
||||||
@@ -281,6 +286,7 @@ void QtVersionManager::addNewVersionsFromInstaller()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
settings->remove(newQtVersionsKey);
|
settings->remove(newQtVersionsKey);
|
||||||
|
settings->remove(QLatin1String("Installer/")+newQtVersionsKey);
|
||||||
updateUniqueIdToIndexMap();
|
updateUniqueIdToIndexMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user