From fa0e63ca7ab9fee37a513a1f45c2106e08ff0558 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 23 Nov 2011 14:01:02 +0100 Subject: [PATCH 01/14] QMakeStep: Fix compilation warning Remove unused variable. Change-Id: I8e060a8569edfa34483497188d480e624fc2c5fe Reviewed-by: Daniel Teske --- src/plugins/qt4projectmanager/qmakestep.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index 7ea921ec589..c1908c35fdb 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -704,8 +704,6 @@ void QMakeStepConfigWidget::updateSummaryLabel() void QMakeStepConfigWidget::updateQmlDebuggingOption() { m_ui->qmlDebuggingLibraryCheckBox->setEnabled(m_step->isQmlDebuggingLibrarySupported()); - - QtSupport::BaseQtVersion *qtVersion = m_step->qt4BuildConfiguration()->qtVersion(); m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging:")); QString warningText; From 1fbf4d9a554433a28181a69105819f64c36c2db6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 28 Nov 2011 11:08:15 +0100 Subject: [PATCH 02/14] Fix tab settings for non-code files. In the case when they are part of the project. The project's EditorConfiguration had an wrongly initialized default editor setting. Change-Id: If6e39ed3efca39d726c28b8278a059c8bbe7c3fc Reviewed-by: Leandro Melo --- src/plugins/projectexplorer/editorconfiguration.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/projectexplorer/editorconfiguration.cpp b/src/plugins/projectexplorer/editorconfiguration.cpp index a44cf0f9b10..f42c8a11e91 100644 --- a/src/plugins/projectexplorer/editorconfiguration.cpp +++ b/src/plugins/projectexplorer/editorconfiguration.cpp @@ -111,6 +111,8 @@ EditorConfiguration::EditorConfiguration() : d(new EditorConfigurationPrivate) d->m_defaultCodeStyle->setDelegatingPool(textEditorSettings->codeStylePool()); d->m_defaultCodeStyle->setDisplayName(tr("Project", "Settings")); d->m_defaultCodeStyle->setId(kId); + d->m_defaultCodeStyle->setCurrentDelegate(d->m_useGlobal + ? TextEditorSettings::instance()->codeStyle() : 0); } EditorConfiguration::~EditorConfiguration() From b98aec872e091520ed261edf7476d6aa22ff4de3 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 28 Nov 2011 10:45:10 +0100 Subject: [PATCH 03/14] translations: update link to wiki page Change-Id: I4e7a4636e2af4f1cb4af1039473038e906693b2d Reviewed-by: Oswald Buddenhagen --- share/qtcreator/translations/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/translations/README b/share/qtcreator/translations/README index f124f887593..1fdfe24fc6c 100644 --- a/share/qtcreator/translations/README +++ b/share/qtcreator/translations/README @@ -3,7 +3,7 @@ How To add translations to Qt Creator - Coordinate over the mailing list to avoid duplicate work. -- Read the instructions at http://qt.gitorious.org/qt/pages/QtLocalization +- Read the instructions at http://wiki.qt-project.org/Qt_Localization - Add your language to the LANGUAGES line in translations.pro. Don't qualify it with a country unless it is reasonable to expect From 09bb332f09c8975dad4f448cc786cfb022111e00 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 29 Nov 2011 08:44:14 +0100 Subject: [PATCH 04/14] QmlJS: Add protection against attached types attaching to themselves. Change-Id: Ib81d5e6baabf5ac8d18411e8936098908de2c2bb Task-number: QTCREATORBUG-6635 Reviewed-by: Leandro Melo (cherry picked from commit 25842cb13a18ec946fe80b6d869f2b00dbd2ce9c) Reviewed-by: Eike Ziller --- src/libs/qmljs/qmljsinterpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 9aafaeea910..0012fa40ca9 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -261,7 +261,7 @@ void QmlObjectValue::processMembers(MemberProcessor *processor) const const QString &attachedTypeName = _metaObject->attachedTypeName(); if (!attachedTypeName.isEmpty()) { const QmlObjectValue *attachedType = valueOwner()->cppQmlTypes().objectByCppName(attachedTypeName); - if (attachedType) + if (attachedType && attachedType != this) // ### only weak protection against infinite loops attachedType->processMembers(processor); } From d8add9504926add171f76f97ea65b49d13b6d823 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 29 Nov 2011 12:53:06 +0100 Subject: [PATCH 05/14] QmlJS: Fix potential crash in find usages. When invalid documents or documents without idEnvironment or rootScope get added to a QmlComponentChain. Change-Id: I64b7062881f19777ba20efda6efa2e7bab02571e Reviewed-by: Leandro Melo (cherry picked from commit 9b411ed5588db9dcbea955e4e45f99b5d06c1cbe) Reviewed-by: Eike Ziller --- src/plugins/qmljseditor/qmljsfindreferences.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp index 49b18e499d2..1dddc575de1 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.cpp +++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp @@ -246,13 +246,14 @@ protected: private: bool contains(const QmlComponentChain *chain) { - if (!chain || !chain->document()) + if (!chain || !chain->document() || !chain->document()->bind()) return false; - if (chain->document()->bind()->idEnvironment()->lookupMember(_name, _scopeChain.context())) - return chain->document()->bind()->idEnvironment() == _scope; + const ObjectValue *idEnv = chain->document()->bind()->idEnvironment(); + if (idEnv && idEnv->lookupMember(_name, _scopeChain.context())) + return idEnv == _scope; const ObjectValue *root = chain->document()->bind()->rootObjectValue(); - if (root->lookupMember(_name, _scopeChain.context())) { + if (root && root->lookupMember(_name, _scopeChain.context())) { return check(root); } From 1166dcd441cff1228689494be68f273ede763dc3 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 2 Dec 2011 11:24:39 +0100 Subject: [PATCH 06/14] SSH: Ask for private key password right on connection start. This prevents event loop issues (e.g. connection timeout). Task-number: QTCREATORBUG-6641 Change-Id: Ibeecaac2621e171a0590621fd9fdde8f7e3ab9c5 Reviewed-by: Christian Kandeler --- src/libs/utils/ssh/sshconnection.cpp | 35 ++++++++++++++++++++++------ src/libs/utils/ssh/sshconnection_p.h | 1 + 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/libs/utils/ssh/sshconnection.cpp b/src/libs/utils/ssh/sshconnection.cpp index 647a3d26be4..cd5d552349b 100644 --- a/src/libs/utils/ssh/sshconnection.cpp +++ b/src/libs/utils/ssh/sshconnection.cpp @@ -453,12 +453,6 @@ void SshConnectionPrivate::handleServiceAcceptPacket() m_sendFacility.sendUserAuthByPwdRequestPacket(m_connParams.userName.toUtf8(), SshCapabilities::SshConnectionService, m_connParams.password.toUtf8()); } else { - Utils::FileReader reader; - if (!reader.fetch(m_connParams.privateKeyFile)) - throw SshClientException(SshKeyFileError, - tr("Private key error: %1").arg(reader.errorString())); - - m_sendFacility.createAuthenticationKey(reader.data()); m_sendFacility.sendUserAuthByKeyRequestPacket(m_connParams.userName.toUtf8(), SshCapabilities::SshConnectionService); } @@ -637,6 +631,22 @@ void SshConnectionPrivate::connectToHost() m_error = SshNoError; m_ignoreNextPacket = false; m_errorString.clear(); + + try { + if (m_connParams.authenticationType == SshConnectionParameters::AuthenticationByKey) + createPrivateKey(); + } catch (const SshClientException &ex) { + m_error = ex.error; + m_errorString = ex.errorString; + emit error(m_error); + return; + } catch (const Botan::Exception &ex) { + m_error = SshKeyFileError; + m_errorString = QString::fromAscii(ex.what()); + emit error(m_error); + return; + } + connect(m_socket, SIGNAL(connected()), this, SLOT(handleSocketConnected())); connect(m_socket, SIGNAL(readyRead()), this, SLOT(handleIncomingData())); connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, @@ -681,7 +691,18 @@ void SshConnectionPrivate::closeConnection(SshErrorCode sshError, bool SshConnectionPrivate::canUseSocket() const { return m_socket->isValid() - && m_socket->state() == QAbstractSocket::ConnectedState; + && m_socket->state() == QAbstractSocket::ConnectedState; +} + +void SshConnectionPrivate::createPrivateKey() +{ + Utils::FileReader reader; + if (m_connParams.privateKeyFile.isEmpty()) + throw SshClientException(SshKeyFileError, tr("No private key file given.")); + if (!reader.fetch(m_connParams.privateKeyFile)) + throw SshClientException(SshKeyFileError, + tr("Private key file error: %1").arg(reader.errorString())); + m_sendFacility.createAuthenticationKey(reader.data()); } QSharedPointer SshConnectionPrivate::createRemoteProcess(const QByteArray &command) diff --git a/src/libs/utils/ssh/sshconnection_p.h b/src/libs/utils/ssh/sshconnection_p.h index 45f1ea03b07..d02cdcb1771 100644 --- a/src/libs/utils/ssh/sshconnection_p.h +++ b/src/libs/utils/ssh/sshconnection_p.h @@ -137,6 +137,7 @@ private: void handleChannelClose(); void handleDisconnect(); bool canUseSocket() const; + void createPrivateKey(); void sendData(const QByteArray &data); From 0bec54d1809affe75f8eaf21160e88b3ba983396 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Fri, 2 Dec 2011 14:56:00 +0100 Subject: [PATCH 07/14] Fix crash in submit editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTCREATORBUG-6657 Change-Id: I1b7b9f6e84b4e81ed1c81c70c9a0b4e3dce360e3 Reviewed-by: Friedemann Kleint Reviewed-by: Eike Ziller Reviewed-by: Robert Löhning --- src/libs/utils/submiteditorwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp index 44aeaa967ff..4a7fafd9d2c 100644 --- a/src/libs/utils/submiteditorwidget.cpp +++ b/src/libs/utils/submiteditorwidget.cpp @@ -323,7 +323,7 @@ static QString wrappedText(const QTextEdit *e) rc += cursor.selectedText(); rc += newLine; cursor.movePosition(QTextCursor::EndOfLine); // Mac needs it - cursor.movePosition(QTextCursor::Right); + cursor.movePosition(QTextCursor::NextCharacter); } return rc; } From 0a59f347946a44583dc4f6271bbfa93b481d84dd Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 5 Dec 2011 15:48:14 +0100 Subject: [PATCH 08/14] Harmattan: Introduce new condition for auto-generation of manifest file. In addition to using an empty file as in 2.3, the user can now also put a magic string at the start of the manifest file. This way, we can use this as the default while also documenting it in-place. Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=284797 Change-Id: I375a73a5d2e9d3e0973d97d81e0110e788d0159a Reviewed-by: Eike Ziller --- share/qtcreator/templates/shared/manifest.aegis | 6 +++--- src/plugins/madde/maemopackagecreationstep.cpp | 11 ++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/share/qtcreator/templates/shared/manifest.aegis b/share/qtcreator/templates/shared/manifest.aegis index e584f96161e..c0d0dd9c4ce 100644 --- a/share/qtcreator/templates/shared/manifest.aegis +++ b/share/qtcreator/templates/shared/manifest.aegis @@ -1,3 +1,4 @@ +AutoGenerateAegisFile