forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.4'
Conflicts: src/libs/qmljs/qmljsinterpreter.cpp src/libs/utils/ssh/sshconnection.cpp src/plugins/madde/maemopackagecreationstep.cpp src/plugins/qt4projectmanager/qmakestep.cpp Change-Id: Id0c9185638038f7506bc9507872d6699345414a9
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
AutoGenerateAegisFile
|
||||||
<!-- Aegis manifest declares the security credentials required by an
|
<!-- Aegis manifest declares the security credentials required by an
|
||||||
application to run correctly. By default, a manifest file will be
|
application to run correctly. By default, a manifest file will be
|
||||||
created or updated automatically as a part of build.
|
created or updated automatically as a part of build.
|
||||||
@@ -9,9 +10,8 @@
|
|||||||
|
|
||||||
To create a manifest file automatically as a part of build (DEFAULT):
|
To create a manifest file automatically as a part of build (DEFAULT):
|
||||||
|
|
||||||
* You may leave this file as-is.
|
* Make sure this file starts with the string "AutoGenerateAegisFile" (without quotes).
|
||||||
* Do not list any '<credential name="token" />' entries
|
* Alternatively, it can also be completely empty.
|
||||||
outside of comments.
|
|
||||||
|
|
||||||
To provide a manifest yourself:
|
To provide a manifest yourself:
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ How To add translations to Qt Creator
|
|||||||
|
|
||||||
- Coordinate over the mailing list to avoid duplicate work.
|
- 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.
|
- Add your language to the LANGUAGES line in translations.pro.
|
||||||
Don't qualify it with a country unless it is reasonable to expect
|
Don't qualify it with a country unless it is reasonable to expect
|
||||||
|
|||||||
@@ -20698,6 +20698,14 @@ Sie können diese Anwendung sowohl auf Desktop- als auch auf mobilen Plattformen
|
|||||||
<source>Timeout waiting for reply from server.</source>
|
<source>Timeout waiting for reply from server.</source>
|
||||||
<translation>Überschreitung des Zeitlimits beim Warten auf Antwort vom Server.</translation>
|
<translation>Überschreitung des Zeitlimits beim Warten auf Antwort vom Server.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>No private key file given.</source>
|
||||||
|
<translation>Keine Datei mit privatem Schlüssel angegeben.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Private key file error: %1</source>
|
||||||
|
<translation>Problem mit privatem Schlüssel: %1</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Qt4ProjectManager::Internal::SubdirsProjectWizardDialog</name>
|
<name>Qt4ProjectManager::Internal::SubdirsProjectWizardDialog</name>
|
||||||
@@ -24590,6 +24598,10 @@ Sollen sie überschrieben werden?</translation>
|
|||||||
<source>Qt</source>
|
<source>Qt</source>
|
||||||
<translation>Qt</translation>
|
<translation>Qt</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Old Creator</source>
|
||||||
|
<translation>Veraltete Creator-Konvention</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>QmlProfiler::Internal::QmlProfilerEngine</name>
|
<name>QmlProfiler::Internal::QmlProfilerEngine</name>
|
||||||
|
|||||||
@@ -19409,6 +19409,10 @@ Error: %2</source>
|
|||||||
<source>Qt</source>
|
<source>Qt</source>
|
||||||
<translation>Qt</translation>
|
<translation>Qt</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Old Creator</source>
|
||||||
|
<translation>Старый Creator</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>QmlJsDebugClient::QmlProfilerEventList</name>
|
<name>QmlJsDebugClient::QmlProfilerEventList</name>
|
||||||
@@ -27127,10 +27131,6 @@ Influences the indentation of continuation lines.
|
|||||||
<source>Unexpected packet of type %1.</source>
|
<source>Unexpected packet of type %1.</source>
|
||||||
<translation>Неожиданный пакет типа %1.</translation>
|
<translation>Неожиданный пакет типа %1.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Private key error: %1</source>
|
|
||||||
<translation>Ошибка закрытого ключа: %1</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Password expired.</source>
|
<source>Password expired.</source>
|
||||||
<translation>Время действия пароля истекло.</translation>
|
<translation>Время действия пароля истекло.</translation>
|
||||||
@@ -27159,6 +27159,14 @@ Influences the indentation of continuation lines.
|
|||||||
<source>Timeout waiting for reply from server.</source>
|
<source>Timeout waiting for reply from server.</source>
|
||||||
<translation>Вышло время ожидания ответа от сервера.</translation>
|
<translation>Вышло время ожидания ответа от сервера.</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>No private key file given.</source>
|
||||||
|
<translation>Не задан файл закрытого ключа.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Private key file error: %1</source>
|
||||||
|
<translation>Ошибка файла закрытого ключа: %1</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Utils::IpAddressLineEdit</name>
|
<name>Utils::IpAddressLineEdit</name>
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
const QString &newName = value.toString();
|
const QString &newName = value.toString();
|
||||||
#endif
|
#endif
|
||||||
// Does the new name exist already?
|
// Does the new name exist already?
|
||||||
if (d->m_resultEnvironment.hasKey(newName))
|
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Utils::EnvironmentItem newVariable(newName, oldValue);
|
Utils::EnvironmentItem newVariable(newName, oldValue);
|
||||||
@@ -227,7 +227,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
const QString stringValue = value.toString();
|
const QString stringValue = value.toString();
|
||||||
if (changesPos != -1) {
|
if (changesPos != -1) {
|
||||||
// We have already changed this value
|
// We have already changed this value
|
||||||
if (stringValue == d->m_baseEnvironment.value(oldName)) {
|
if (d->m_baseEnvironment.hasKey(oldName) && stringValue == d->m_baseEnvironment.value(oldName)) {
|
||||||
// ... and now went back to the base value
|
// ... and now went back to the base value
|
||||||
d->m_items.removeAt(changesPos);
|
d->m_items.removeAt(changesPos);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
SaveFile::SaveFile(const QString &filename) :
|
SaveFile::SaveFile(const QString &filename) :
|
||||||
m_finalFileName(filename), m_finalized(false), m_backup(false)
|
m_finalFileName(filename), m_finalized(true), m_backup(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,6 +62,7 @@ bool SaveFile::open(OpenMode flags)
|
|||||||
if (!QTemporaryFile::open(flags))
|
if (!QTemporaryFile::open(flags))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_finalized = false; // needs clean up in the end
|
||||||
if (ofi.exists())
|
if (ofi.exists())
|
||||||
setPermissions(ofi.permissions()); // Ignore errors
|
setPermissions(ofi.permissions()); // Ignore errors
|
||||||
|
|
||||||
|
|||||||
@@ -453,14 +453,6 @@ void SshConnectionPrivate::handleServiceAcceptPacket()
|
|||||||
m_sendFacility.sendUserAuthByPwdRequestPacket(m_connParams.userName.toUtf8(),
|
m_sendFacility.sendUserAuthByPwdRequestPacket(m_connParams.userName.toUtf8(),
|
||||||
SshCapabilities::SshConnectionService, m_connParams.password.toUtf8());
|
SshCapabilities::SshConnectionService, m_connParams.password.toUtf8());
|
||||||
} else {
|
} else {
|
||||||
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 error: %1").arg(reader.errorString()));
|
|
||||||
|
|
||||||
m_sendFacility.createAuthenticationKey(reader.data());
|
|
||||||
m_sendFacility.sendUserAuthByKeyRequestPacket(m_connParams.userName.toUtf8(),
|
m_sendFacility.sendUserAuthByKeyRequestPacket(m_connParams.userName.toUtf8(),
|
||||||
SshCapabilities::SshConnectionService);
|
SshCapabilities::SshConnectionService);
|
||||||
}
|
}
|
||||||
@@ -639,6 +631,22 @@ void SshConnectionPrivate::connectToHost()
|
|||||||
m_error = SshNoError;
|
m_error = SshNoError;
|
||||||
m_ignoreNextPacket = false;
|
m_ignoreNextPacket = false;
|
||||||
m_errorString.clear();
|
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(connected()), this, SLOT(handleSocketConnected()));
|
||||||
connect(m_socket, SIGNAL(readyRead()), this, SLOT(handleIncomingData()));
|
connect(m_socket, SIGNAL(readyRead()), this, SLOT(handleIncomingData()));
|
||||||
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this,
|
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this,
|
||||||
@@ -686,6 +694,17 @@ bool SshConnectionPrivate::canUseSocket() const
|
|||||||
&& 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<SshRemoteProcess> SshConnectionPrivate::createRemoteProcess(const QByteArray &command)
|
QSharedPointer<SshRemoteProcess> SshConnectionPrivate::createRemoteProcess(const QByteArray &command)
|
||||||
{
|
{
|
||||||
return m_channelManager->createRemoteProcess(command);
|
return m_channelManager->createRemoteProcess(command);
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ private:
|
|||||||
void handleChannelClose();
|
void handleChannelClose();
|
||||||
void handleDisconnect();
|
void handleDisconnect();
|
||||||
bool canUseSocket() const;
|
bool canUseSocket() const;
|
||||||
|
void createPrivateKey();
|
||||||
|
|
||||||
void sendData(const QByteArray &data);
|
void sendData(const QByteArray &data);
|
||||||
|
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ static QString wrappedText(const QTextEdit *e)
|
|||||||
rc += cursor.selectedText();
|
rc += cursor.selectedText();
|
||||||
rc += newLine;
|
rc += newLine;
|
||||||
cursor.movePosition(QTextCursor::EndOfLine); // Mac needs it
|
cursor.movePosition(QTextCursor::EndOfLine); // Mac needs it
|
||||||
cursor.movePosition(QTextCursor::Right);
|
cursor.movePosition(QTextCursor::NextCharacter);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>673</width>
|
<width>673</width>
|
||||||
<height>210</height>
|
<height>240</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@@ -17,28 +17,53 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<property name="sizeConstraint">
|
||||||
<widget class="QLabel" name="label">
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<item row="4" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>40</width>
|
||||||
<height>0</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="searchButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sco&pe:</string>
|
<string>&Search</string>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="replaceButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Search && &Replace</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sear&ch for:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>filterList</cstring>
|
<cstring>searchTerm</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -77,22 +102,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Sear&ch for:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>searchTerm</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="searchTerm"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
@@ -136,6 +145,34 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sco&pe:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>filterList</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="searchTerm"/>
|
||||||
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QWidget" name="configWidget" native="true">
|
<widget class="QWidget" name="configWidget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -146,53 +183,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="searchButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Search</string>
|
|
||||||
</property>
|
|
||||||
<property name="default">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="replaceButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Search && &Replace</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include <QtGui/QStringListModel>
|
#include <QtGui/QStringListModel>
|
||||||
#include <QtGui/QCompleter>
|
#include <QtGui/QCompleter>
|
||||||
#include <QtGui/QKeyEvent>
|
#include <QtGui/QKeyEvent>
|
||||||
|
#include <QtGui/QScrollArea>
|
||||||
|
|
||||||
using namespace Find;
|
using namespace Find;
|
||||||
using namespace Find::Internal;
|
using namespace Find::Internal;
|
||||||
@@ -186,6 +187,19 @@ void FindToolWindow::setCurrentFilter(int index)
|
|||||||
configWidget->setParent(0);
|
configWidget->setParent(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
QWidget *w = m_ui.configWidget;
|
||||||
|
while (w) {
|
||||||
|
QScrollArea *sa = qobject_cast<QScrollArea *>(w);
|
||||||
|
if (sa) {
|
||||||
|
sa->updateGeometry();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
w = w->parentWidget();
|
||||||
|
}
|
||||||
|
for (w = m_configWidget ? m_configWidget : m_ui.configWidget; w; w = w->parentWidget()) {
|
||||||
|
if (w->layout())
|
||||||
|
w->layout()->activate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindToolWindow::acceptAndGetParameters(QString *term, IFindFilter **filter)
|
void FindToolWindow::acceptAndGetParameters(QString *term, IFindFilter **filter)
|
||||||
|
|||||||
@@ -492,6 +492,13 @@ QModelIndex SearchResultTreeModel::prevIndex(const QModelIndex &idx, bool *wrapp
|
|||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QModelIndex SearchResultTreeModel::followingIndex(const QModelIndex &idx, bool backward, bool includeGenerated, bool *wrapped)
|
||||||
|
{
|
||||||
|
if (backward)
|
||||||
|
return prev(idx, includeGenerated, wrapped);
|
||||||
|
return next(idx, includeGenerated, wrapped);
|
||||||
|
}
|
||||||
|
|
||||||
QModelIndex SearchResultTreeModel::prev(const QModelIndex &idx, bool includeGenerated, bool *wrapped) const
|
QModelIndex SearchResultTreeModel::prev(const QModelIndex &idx, bool includeGenerated, bool *wrapped) const
|
||||||
{
|
{
|
||||||
QModelIndex value = idx;
|
QModelIndex value = idx;
|
||||||
@@ -502,7 +509,8 @@ QModelIndex SearchResultTreeModel::prev(const QModelIndex &idx, bool includeGene
|
|||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex SearchResultTreeModel::find(const QRegExp &expr, const QModelIndex &index,
|
QModelIndex SearchResultTreeModel::find(const QRegExp &expr, const QModelIndex &index,
|
||||||
QTextDocument::FindFlags flags, bool *wrapped)
|
QTextDocument::FindFlags flags,
|
||||||
|
bool startWithCurrentIndex, bool *wrapped)
|
||||||
{
|
{
|
||||||
QModelIndex resultIndex;
|
QModelIndex resultIndex;
|
||||||
QModelIndex currentIndex = index;
|
QModelIndex currentIndex = index;
|
||||||
@@ -512,6 +520,8 @@ QModelIndex SearchResultTreeModel::find(const QRegExp &expr, const QModelIndex &
|
|||||||
bool anyWrapped = false;
|
bool anyWrapped = false;
|
||||||
bool stepWrapped = false;
|
bool stepWrapped = false;
|
||||||
|
|
||||||
|
if (!startWithCurrentIndex)
|
||||||
|
currentIndex = followingIndex(currentIndex, backward, true, &stepWrapped);
|
||||||
do {
|
do {
|
||||||
anyWrapped |= stepWrapped; // update wrapped state if we actually stepped to next/prev item
|
anyWrapped |= stepWrapped; // update wrapped state if we actually stepped to next/prev item
|
||||||
if (currentIndex.isValid()) {
|
if (currentIndex.isValid()) {
|
||||||
@@ -519,10 +529,7 @@ QModelIndex SearchResultTreeModel::find(const QRegExp &expr, const QModelIndex &
|
|||||||
if (expr.indexIn(text) != -1)
|
if (expr.indexIn(text) != -1)
|
||||||
resultIndex = currentIndex;
|
resultIndex = currentIndex;
|
||||||
}
|
}
|
||||||
if (backward)
|
currentIndex = followingIndex(currentIndex, backward, true, &stepWrapped);
|
||||||
currentIndex = prev(currentIndex, true, &stepWrapped);
|
|
||||||
else
|
|
||||||
currentIndex = next(currentIndex, true, &stepWrapped);
|
|
||||||
} while (!resultIndex.isValid() && currentIndex.isValid() && currentIndex != index);
|
} while (!resultIndex.isValid() && currentIndex.isValid() && currentIndex != index);
|
||||||
if (resultIndex.isValid() && wrapped)
|
if (resultIndex.isValid() && wrapped)
|
||||||
*wrapped = anyWrapped;
|
*wrapped = anyWrapped;
|
||||||
@@ -530,7 +537,8 @@ QModelIndex SearchResultTreeModel::find(const QRegExp &expr, const QModelIndex &
|
|||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex SearchResultTreeModel::find(const QString &term, const QModelIndex &index,
|
QModelIndex SearchResultTreeModel::find(const QString &term, const QModelIndex &index,
|
||||||
QTextDocument::FindFlags flags, bool *wrapped)
|
QTextDocument::FindFlags flags,
|
||||||
|
bool startWithCurrentIndex, bool *wrapped)
|
||||||
{
|
{
|
||||||
QModelIndex resultIndex;
|
QModelIndex resultIndex;
|
||||||
QModelIndex currentIndex = index;
|
QModelIndex currentIndex = index;
|
||||||
@@ -541,6 +549,8 @@ QModelIndex SearchResultTreeModel::find(const QString &term, const QModelIndex &
|
|||||||
bool anyWrapped = false;
|
bool anyWrapped = false;
|
||||||
bool stepWrapped = false;
|
bool stepWrapped = false;
|
||||||
|
|
||||||
|
if (!startWithCurrentIndex)
|
||||||
|
currentIndex = followingIndex(currentIndex, backward, true, &stepWrapped);
|
||||||
do {
|
do {
|
||||||
anyWrapped |= stepWrapped; // update wrapped state if we actually stepped to next/prev item
|
anyWrapped |= stepWrapped; // update wrapped state if we actually stepped to next/prev item
|
||||||
if (currentIndex.isValid()) {
|
if (currentIndex.isValid()) {
|
||||||
@@ -549,10 +559,7 @@ QModelIndex SearchResultTreeModel::find(const QString &term, const QModelIndex &
|
|||||||
if (!doc.find(term, 0, flags).isNull())
|
if (!doc.find(term, 0, flags).isNull())
|
||||||
resultIndex = currentIndex;
|
resultIndex = currentIndex;
|
||||||
}
|
}
|
||||||
if (backward)
|
currentIndex = followingIndex(currentIndex, backward, true, &stepWrapped);
|
||||||
currentIndex = prev(currentIndex, true, &stepWrapped);
|
|
||||||
else
|
|
||||||
currentIndex = next(currentIndex, true, &stepWrapped);
|
|
||||||
} while (!resultIndex.isValid() && currentIndex.isValid() && currentIndex != index);
|
} while (!resultIndex.isValid() && currentIndex.isValid() && currentIndex != index);
|
||||||
if (resultIndex.isValid() && wrapped)
|
if (resultIndex.isValid() && wrapped)
|
||||||
*wrapped = anyWrapped;
|
*wrapped = anyWrapped;
|
||||||
|
|||||||
@@ -71,9 +71,9 @@ public:
|
|||||||
QList<QModelIndex> addResults(const QList<SearchResultItem> &items, SearchResult::AddMode mode);
|
QList<QModelIndex> addResults(const QList<SearchResultItem> &items, SearchResult::AddMode mode);
|
||||||
|
|
||||||
QModelIndex find(const QRegExp &expr, const QModelIndex &index,
|
QModelIndex find(const QRegExp &expr, const QModelIndex &index,
|
||||||
QTextDocument::FindFlags flags, bool *wrapped = 0);
|
QTextDocument::FindFlags flags, bool startWithCurrentIndex, bool *wrapped = 0);
|
||||||
QModelIndex find(const QString &term, const QModelIndex &index,
|
QModelIndex find(const QString &term, const QModelIndex &index,
|
||||||
QTextDocument::FindFlags flags, bool *wrapped = 0);
|
QTextDocument::FindFlags flags, bool startWithCurrentIndex, bool *wrapped = 0);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void jumpToSearchResult(const QString &fileName, int lineNumber,
|
void jumpToSearchResult(const QString &fileName, int lineNumber,
|
||||||
@@ -90,6 +90,8 @@ private:
|
|||||||
bool setCheckState(const QModelIndex &idx, Qt::CheckState checkState, bool firstCall = true);
|
bool setCheckState(const QModelIndex &idx, Qt::CheckState checkState, bool firstCall = true);
|
||||||
QModelIndex nextIndex(const QModelIndex &idx, bool *wrapped = 0) const;
|
QModelIndex nextIndex(const QModelIndex &idx, bool *wrapped = 0) const;
|
||||||
QModelIndex prevIndex(const QModelIndex &idx, bool *wrapped = 0) const;
|
QModelIndex prevIndex(const QModelIndex &idx, bool *wrapped = 0) const;
|
||||||
|
QModelIndex followingIndex(const QModelIndex &idx, bool backward, bool includeGenerated = false,
|
||||||
|
bool *wrapped = 0);
|
||||||
SearchResultTreeItem *treeItemAtIndex(const QModelIndex &idx) const;
|
SearchResultTreeItem *treeItemAtIndex(const QModelIndex &idx) const;
|
||||||
|
|
||||||
SearchResultTreeItem *m_rootItem;
|
SearchResultTreeItem *m_rootItem;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public:
|
|||||||
}
|
}
|
||||||
m_view->setCurrentIndex(m_incrementalFindStart);
|
m_view->setCurrentIndex(m_incrementalFindStart);
|
||||||
bool wrapped = false;
|
bool wrapped = false;
|
||||||
IFindSupport::Result result = find(txt, findFlags, &wrapped);
|
IFindSupport::Result result = find(txt, findFlags, true/*startFromCurrent*/, &wrapped);
|
||||||
if (wrapped != m_incrementalWrappedState) {
|
if (wrapped != m_incrementalWrappedState) {
|
||||||
m_incrementalWrappedState = wrapped;
|
m_incrementalWrappedState = wrapped;
|
||||||
showWrapIndicator(m_view);
|
showWrapIndicator(m_view);
|
||||||
@@ -128,7 +128,7 @@ public:
|
|||||||
IFindSupport::Result findStep(const QString &txt, Find::FindFlags findFlags)
|
IFindSupport::Result findStep(const QString &txt, Find::FindFlags findFlags)
|
||||||
{
|
{
|
||||||
bool wrapped = false;
|
bool wrapped = false;
|
||||||
IFindSupport::Result result = find(txt, findFlags, &wrapped);
|
IFindSupport::Result result = find(txt, findFlags, false/*startFromNext*/, &wrapped);
|
||||||
if (wrapped)
|
if (wrapped)
|
||||||
showWrapIndicator(m_view);
|
showWrapIndicator(m_view);
|
||||||
if (result == IFindSupport::Found) {
|
if (result == IFindSupport::Found) {
|
||||||
@@ -138,7 +138,8 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
IFindSupport::Result find(const QString &txt, Find::FindFlags findFlags, bool *wrapped)
|
IFindSupport::Result find(const QString &txt, Find::FindFlags findFlags,
|
||||||
|
bool startFromCurrentIndex, bool *wrapped)
|
||||||
{
|
{
|
||||||
if (wrapped)
|
if (wrapped)
|
||||||
*wrapped = false;
|
*wrapped = false;
|
||||||
@@ -150,11 +151,13 @@ public:
|
|||||||
index = m_view->model()->find(QRegExp(txt, (sensitive ? Qt::CaseSensitive : Qt::CaseInsensitive)),
|
index = m_view->model()->find(QRegExp(txt, (sensitive ? Qt::CaseSensitive : Qt::CaseInsensitive)),
|
||||||
m_view->currentIndex(),
|
m_view->currentIndex(),
|
||||||
Find::textDocumentFlagsForFindFlags(findFlags),
|
Find::textDocumentFlagsForFindFlags(findFlags),
|
||||||
|
startFromCurrentIndex,
|
||||||
wrapped);
|
wrapped);
|
||||||
} else {
|
} else {
|
||||||
index = m_view->model()->find(txt,
|
index = m_view->model()->find(txt,
|
||||||
m_view->currentIndex(),
|
m_view->currentIndex(),
|
||||||
Find::textDocumentFlagsForFindFlags(findFlags),
|
Find::textDocumentFlagsForFindFlags(findFlags),
|
||||||
|
startFromCurrentIndex,
|
||||||
wrapped);
|
wrapped);
|
||||||
}
|
}
|
||||||
if (index.isValid()) {
|
if (index.isValid()) {
|
||||||
|
|||||||
@@ -58,7 +58,28 @@ namespace Find {
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class SearchResultWindowPrivate : public QObject {
|
class InternalScrollArea : public QScrollArea
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit InternalScrollArea(QWidget *parent)
|
||||||
|
: QScrollArea(parent)
|
||||||
|
{
|
||||||
|
setFrameStyle(QFrame::NoFrame);
|
||||||
|
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize sizeHint() const
|
||||||
|
{
|
||||||
|
if (widget())
|
||||||
|
return widget()->size();
|
||||||
|
return QScrollArea::sizeHint();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class SearchResultWindowPrivate : public QObject
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SearchResultWindowPrivate(SearchResultWindow *window);
|
SearchResultWindowPrivate(SearchResultWindow *window);
|
||||||
@@ -210,8 +231,7 @@ SearchResultWindow::SearchResultWindow(QWidget *newSearchPanel)
|
|||||||
d->m_widget = new QStackedWidget;
|
d->m_widget = new QStackedWidget;
|
||||||
d->m_widget->setWindowTitle(displayName());
|
d->m_widget->setWindowTitle(displayName());
|
||||||
|
|
||||||
QScrollArea *newSearchArea = new QScrollArea(d->m_widget);
|
InternalScrollArea *newSearchArea = new InternalScrollArea(d->m_widget);
|
||||||
newSearchArea->setFrameStyle(QFrame::NoFrame);
|
|
||||||
newSearchArea->setWidget(newSearchPanel);
|
newSearchArea->setWidget(newSearchPanel);
|
||||||
newSearchArea->setFocusProxy(newSearchPanel);
|
newSearchArea->setFocusProxy(newSearchPanel);
|
||||||
d->m_widget->addWidget(newSearchArea);
|
d->m_widget->addWidget(newSearchArea);
|
||||||
|
|||||||
@@ -401,14 +401,8 @@ bool MaemoDebianPackageCreationStep::copyDebianFiles(bool inSourceBuild)
|
|||||||
foreach (const QString &fileName, files) {
|
foreach (const QString &fileName, files) {
|
||||||
const QString srcFile = m_templatesDirPath + QLatin1Char('/') + fileName;
|
const QString srcFile = m_templatesDirPath + QLatin1Char('/') + fileName;
|
||||||
QString newFileName = fileName;
|
QString newFileName = fileName;
|
||||||
if (newFileName == Qt4HarmattanTarget::aegisManifestFileName()) {
|
if (newFileName == Qt4HarmattanTarget::aegisManifestFileName())
|
||||||
// If the user has touched the Aegis manifest file, we copy it for use
|
|
||||||
// by MADDE. Otherwise the required capabilities will be auto-detected,
|
|
||||||
// unless the user explicitly requests that no manifest should be created.
|
|
||||||
if (QFileInfo(srcFile).size() == 0)
|
|
||||||
continue;
|
|
||||||
newFileName = m_packageName + QLatin1String(".aegis");
|
newFileName = m_packageName + QLatin1String(".aegis");
|
||||||
}
|
|
||||||
|
|
||||||
const QString destFile = debianDirPath + QLatin1Char('/') + newFileName;
|
const QString destFile = debianDirPath + QLatin1Char('/') + newFileName;
|
||||||
if (fileName == QLatin1String("rules")) {
|
if (fileName == QLatin1String("rules")) {
|
||||||
@@ -424,6 +418,9 @@ bool MaemoDebianPackageCreationStep::copyDebianFiles(bool inSourceBuild)
|
|||||||
.arg(QDir::toNativeSeparators(srcFile), reader.errorString()));
|
.arg(QDir::toNativeSeparators(srcFile), reader.errorString()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (reader.data().isEmpty() || reader.data().startsWith("AutoGenerateAegisFile"))
|
||||||
|
continue;
|
||||||
if (reader.data().startsWith("NoAegisFile")) {
|
if (reader.data().startsWith("NoAegisFile")) {
|
||||||
QFile targetFile(destFile);
|
QFile targetFile(destFile);
|
||||||
if (!targetFile.open(QIODevice::WriteOnly)) {
|
if (!targetFile.open(QIODevice::WriteOnly)) {
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ EditorConfiguration::EditorConfiguration() : d(new EditorConfigurationPrivate)
|
|||||||
d->m_defaultCodeStyle->setDelegatingPool(textEditorSettings->codeStylePool());
|
d->m_defaultCodeStyle->setDelegatingPool(textEditorSettings->codeStylePool());
|
||||||
d->m_defaultCodeStyle->setDisplayName(tr("Project", "Settings"));
|
d->m_defaultCodeStyle->setDisplayName(tr("Project", "Settings"));
|
||||||
d->m_defaultCodeStyle->setId(kId);
|
d->m_defaultCodeStyle->setId(kId);
|
||||||
|
d->m_defaultCodeStyle->setCurrentDelegate(d->m_useGlobal
|
||||||
|
? TextEditorSettings::instance()->codeStyle() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorConfiguration::~EditorConfiguration()
|
EditorConfiguration::~EditorConfiguration()
|
||||||
|
|||||||
@@ -692,7 +692,6 @@ void QMakeStepConfigWidget::updateSummaryLabel()
|
|||||||
void QMakeStepConfigWidget::updateQmlDebuggingOption()
|
void QMakeStepConfigWidget::updateQmlDebuggingOption()
|
||||||
{
|
{
|
||||||
m_ui->qmlDebuggingLibraryCheckBox->setEnabled(m_step->isQmlDebuggingLibrarySupported());
|
m_ui->qmlDebuggingLibraryCheckBox->setEnabled(m_step->isQmlDebuggingLibrarySupported());
|
||||||
|
|
||||||
m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging:"));
|
m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging:"));
|
||||||
|
|
||||||
QString warningText;
|
QString warningText;
|
||||||
|
|||||||
Reference in New Issue
Block a user