diff --git a/scripts/shipping/prepare-linux-qt-for-shipping.sh b/scripts/shipping/prepare-linux-qt-for-shipping.sh index 2f49413ebdd121875144ded7c319bcd5a4676f83..b8c058a84cb6dcf3b09ee3fc9ca242fdf69d25d9 100755 --- a/scripts/shipping/prepare-linux-qt-for-shipping.sh +++ b/scripts/shipping/prepare-linux-qt-for-shipping.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -version=4.4.3 +version="4.5-rc1" workdir=/home/berlin/dev/qt-${version}-temp destdir=/home/berlin/dev/qt-${version}-shipping/qt # "/qt" suffix for Bitrock dir=qt-x11-opensource-src-${version} diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index f0cda5147c2eed82ed7969c63e8d206611a041e8..82a8be37d721e20bd05ff907afd70b2ecbbc8810 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -185,7 +185,9 @@ void CodepasterPlugin::post() // 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 if (!data.contains("\r\n")) { diff --git a/src/plugins/cpaster/settingspage.h b/src/plugins/cpaster/settingspage.h index a492030752c7ec8b6b9f5c7b32cb2c395adab66e..98df299a5f667f5234ac378f21e94e5f82841610 100644 --- a/src/plugins/cpaster/settingspage.h +++ b/src/plugins/cpaster/settingspage.h @@ -65,8 +65,8 @@ public: QString username() const; QUrl serverUrl() const; - bool copyToClipBoard() const; - bool displayOutput() const; + inline bool copyToClipBoard() const { return m_copy; } + inline bool displayOutput() const { return m_output; } private: Ui_SettingsPage m_ui; diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp index a683dccd86451d2a560199880fad483a34d276f4..869443a9aaf88784b6df3597d846cf4a11e36143 100644 --- a/src/plugins/designer/formwindoweditor.cpp +++ b/src/plugins/designer/formwindoweditor.cpp @@ -45,6 +45,8 @@ #include <QtDesigner/QDesignerFormWindowInterface> #include <QtDesigner/QDesignerFormEditorInterface> #include <QtDesigner/QDesignerFormWindowManagerInterface> +#include <QtDesigner/QDesignerPropertyEditorInterface> +#include <QtDesigner/QDesignerWidgetDataBaseInterface> #include <qt_private/formwindowbase_p.h> #include <qt_private/qtresourcemodel_p.h> @@ -325,3 +327,25 @@ void FormWindowEditor::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; +} diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h index e854ccac915a69141600f6ead2e86e483a33c041..bce29c2f5a8844e8d3cb24c3b34c84b8a4db8bd0 100644 --- a/src/plugins/designer/formwindoweditor.h +++ b/src/plugins/designer/formwindoweditor.h @@ -63,7 +63,6 @@ class EditorWidget; class FormWindowEditor : public Core::IEditor { Q_OBJECT - public: FormWindowEditor(const QList<int> &context, QDesignerFormWindowInterface *form, @@ -84,8 +83,9 @@ public: bool restoreState(const QByteArray &state); // ContextInterface - QList<int> context() const; - QWidget *widget(); + virtual QList<int> context() const; + virtual QWidget *widget(); + virtual QString contextHelpId() const; QDesignerFormWindowInterface *formWindow() const; QWidget *integrationContainer(); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 007aac874de5171e7292680433c83e83c8e9e590..87f06931200b13a411d29487b5c42593a0217616 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -207,20 +207,20 @@ void GitClient::diff(const QString &workingDirectory, QStringList arguments; arguments << QLatin1String("diff") << diffArgs; m_plugin->outputWindow()->append(formatCommand(binary, arguments)); - command->addJob(arguments); + command->addJob(arguments, m_settings.timeout); } else { // Files diff. if (!unstagedFileNames.empty()) { QStringList arguments; arguments << QLatin1String("diff") << diffArgs << QLatin1String("--") << unstagedFileNames; m_plugin->outputWindow()->append(formatCommand(binary, arguments)); - command->addJob(arguments); + command->addJob(arguments, m_settings.timeout); } if (!stagedFileNames.empty()) { QStringList arguments; arguments << QLatin1String("diff") << QLatin1String("--cached") << diffArgs << QLatin1String("--") << stagedFileNames; m_plugin->outputWindow()->append(formatCommand(binary, arguments)); - command->addJob(arguments); + command->addJob(arguments, m_settings.timeout); } } command->execute(); @@ -503,7 +503,7 @@ void GitClient::executeGit(const QString &workingDirectory, { m_plugin->outputWindow()->append(formatCommand(QLatin1String(Constants::GIT_BINARY), arguments)); GitCommand *command = createCommand(workingDirectory, editor, outputToWindow); - command->addJob(arguments); + command->addJob(arguments, m_settings.timeout); command->execute(); } diff --git a/src/plugins/git/gitcommand.cpp b/src/plugins/git/gitcommand.cpp index fa62401b0119c1d22f789935af2b9a7ab2d3ec74..8362926cecc431acbe9525067b96566f4171d74c 100644 --- a/src/plugins/git/gitcommand.cpp +++ b/src/plugins/git/gitcommand.cpp @@ -55,8 +55,9 @@ static inline QStringList environmentToList(const ProjectExplorer::Environment & return ProjectExplorer::Environment::systemEnvironment().toStringList(); } -GitCommand::Job::Job(const QStringList &a) : - arguments(a) +GitCommand::Job::Job(const QStringList &a, int t) : + 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() @@ -109,7 +110,7 @@ void GitCommand::run() qDebug() << "GitCommand::run" << j << '/' << count << 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; error += QLatin1String("Error: Git timed out"); break; diff --git a/src/plugins/git/gitcommand.h b/src/plugins/git/gitcommand.h index a587b74876140a3b6a29873b5c02456ada586080..32b76bf3485912c314727c0fb7592979b49e173c 100644 --- a/src/plugins/git/gitcommand.h +++ b/src/plugins/git/gitcommand.h @@ -49,7 +49,7 @@ public: ProjectExplorer::Environment &environment); - void addJob(const QStringList &arguments); + void addJob(const QStringList &arguments, int timeout); void execute(); private: @@ -61,9 +61,10 @@ Q_SIGNALS: private: struct Job { - explicit Job(const QStringList &a); + explicit Job(const QStringList &a, int t); QStringList arguments; + int timeout; }; QStringList environment() const; diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index 2b528a72d2a8c477ff902c20ddf5285057489420..02a1acc1d9eaaf14c4c04f136d49482ecff6080a 100644 --- a/src/plugins/git/gitsettings.cpp +++ b/src/plugins/git/gitsettings.cpp @@ -40,15 +40,17 @@ static const char *groupC = "Git"; static const char *sysEnvKeyC = "SysEnv"; static const char *pathKeyC = "Path"; static const char *logCountKeyC = "LogCount"; +static const char *timeoutKeyC = "TimeOut"; -enum { defaultLogCount = 10 }; +enum { defaultLogCount = 10 , defaultTimeOut = 30}; namespace Git { namespace Internal { GitSettings::GitSettings() : adoptPath(false), - logCount(defaultLogCount) + logCount(defaultLogCount), + timeout(defaultTimeOut) { } @@ -58,6 +60,7 @@ void GitSettings::fromSettings(QSettings *settings) adoptPath = settings->value(QLatin1String(sysEnvKeyC), false).toBool(); path = settings->value(QLatin1String(pathKeyC), QString()).toString(); logCount = settings->value(QLatin1String(logCountKeyC), defaultLogCount).toInt(); + timeout = settings->value(QLatin1String(timeoutKeyC), defaultTimeOut).toInt(); settings->endGroup(); } @@ -67,12 +70,13 @@ void GitSettings::toSettings(QSettings *settings) const settings->setValue(QLatin1String(sysEnvKeyC), adoptPath); settings->setValue(QLatin1String(pathKeyC), path); settings->setValue(QLatin1String(logCountKeyC), logCount); + settings->setValue(QLatin1String(timeoutKeyC), timeout); settings->endGroup(); } 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; } } diff --git a/src/plugins/git/gitsettings.h b/src/plugins/git/gitsettings.h index 59169922605e83c8d02d2016169220c6e5579dca..c2463eb326da6d3cf69e21503cb37f539b8fc97f 100644 --- a/src/plugins/git/gitsettings.h +++ b/src/plugins/git/gitsettings.h @@ -56,6 +56,7 @@ struct GitSettings bool adoptPath; QString path; int logCount; + int timeout; }; inline bool operator==(const GitSettings &p1, const GitSettings &p2) diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp index a3b82194cec1a886ac72e2d9428cc1caed0eb227..121c7cd889b1ad048d9c3069d96d82757d6686d3 100644 --- a/src/plugins/git/settingspage.cpp +++ b/src/plugins/git/settingspage.cpp @@ -52,6 +52,7 @@ GitSettings SettingsPageWidget::settings() const rc.path = m_ui.pathLineEdit->text(); rc.adoptPath = m_ui.environmentGroupBox->isChecked() && !rc.path.isEmpty(); rc.logCount = m_ui.logCountSpinBox->value(); + rc.timeout = m_ui.timeoutSpinBox->value(); return rc; } @@ -60,6 +61,7 @@ void SettingsPageWidget::setSettings(const GitSettings &s) m_ui.environmentGroupBox->setChecked(s.adoptPath); m_ui.pathLineEdit->setText(s.path); m_ui.logCountSpinBox->setValue(s.logCount); + m_ui.timeoutSpinBox->setValue(s.timeout); } void SettingsPageWidget::setSystemPath() diff --git a/src/plugins/git/settingspage.ui b/src/plugins/git/settingspage.ui index 94c04493aabb47f69ea469348f3d3304a2d08868..1a594bf4313fc8354d13d125bbae783e6593fa2e 100644 --- a/src/plugins/git/settingspage.ui +++ b/src/plugins/git/settingspage.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>403</width> - <height>183</height> + <height>251</height> </rect> </property> <property name="windowTitle"> @@ -69,10 +69,14 @@ </widget> </item> <item> - <layout class="QFormLayout" name="logFormLayout"> - <property name="fieldGrowthPolicy"> - <enum>QFormLayout::ExpandingFieldsGrow</enum> - </property> + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="logCountLabel"> + <property name="text"> + <string>Log commit display count:</string> + </property> + </widget> + </item> <item row="0" column="1"> <widget class="QSpinBox" name="logCountSpinBox"> <property name="toolTip"> @@ -83,10 +87,23 @@ </property> </widget> </item> - <item row="0" column="0"> - <widget class="QLabel" name="logCountLabel"> + <item row="1" column="0"> + <widget class="QLabel" name="timeoutLabel"> <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> </widget> </item> diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 2e7440bb57191c9381b012cef8ea19437c18d025..8abe37fd201271320c06f9ff89b9298505744074 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -241,12 +241,17 @@ void QtVersionManager::addNewVersionsFromInstaller() // 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. QSettings *settings = Core::ICore::instance()->settings(); - if (!settings->contains(newQtVersionsKey)) + + if (!settings->contains(newQtVersionsKey) && + !settings->contains(QLatin1String("Installer/")+newQtVersionsKey)) return; // qDebug()<<"QtVersionManager::addNewVersionsFromInstaller()"; QString newVersionsValue = settings->value(newQtVersionsKey).toString(); + if (newVersionsValue.isEmpty()) + newVersionsValue = settings->value(QLatin1String("Installer/")+newQtVersionsKey).toString(); + QStringList newVersionsList = newVersionsValue.split(';', QString::SkipEmptyParts); bool defaultVersionWasReset = false; foreach (QString newVersion, newVersionsList) { @@ -281,6 +286,7 @@ void QtVersionManager::addNewVersionsFromInstaller() } } settings->remove(newQtVersionsKey); + settings->remove(QLatin1String("Installer/")+newQtVersionsKey); updateUniqueIdToIndexMap(); }