Commit bf8cb5d4 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.3'

Conflicts:
	qtcreator.pri

Change-Id: Iaca68084799ae9aec257742c395609d6e8aa72cd
parents 5606b9d2 629de47f
let $prefix := string("QT_TRANSLATE_NOOP("Core::Internal::ExternalTool", "")
let $suffix := concat("")", codepoints-to-string(10))
for $file in tokenize($files, string("\|"))
let $doc := doc($file)
for $text in ($doc/*:externaltool/*:description, $doc/*:externaltool/*:displayname, $doc/*:externaltool/*:category)
return fn:concat($prefix, data($text), $suffix)
......@@ -29506,7 +29506,7 @@ plutôt que dans le répertoire d'installation lors d'une exècution e
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A versioned backup of the .user settings file will be used, because the non-versioned file was created by an incompatible newer version of Qt Creator.&lt;/p&gt;&lt;p&gt;Project settings changes made since the last time this version of Qt Creator was used with this project are ignored, and changes made now will &lt;b&gt;not&lt;/b&gt; be propagated to the newer version.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Un back-up versionné du fichier de paramètres .user sera utilisé parce qu&apos;un fichier non versionné a été créé par une version plus récente et incompatible de Qt Creator.&lt;/p&gt;&lt;p&gt;Les changements aux préférences du projet effectuées depuis la dernière fois que cette version dfe Qt Creator a été utilisée avec ce projet sont ignorés et les changements effectués dès maintenant ne seront &lt;b&gt;pas&lt;/b&gt; propagés à la nouvelle version.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Un back-up versionné du fichier de paramètres .user sera utilisé parce qu&apos;un fichier non versionné a été créé par une version plus récente et incompatible de Qt Creator.&lt;/p&gt;&lt;p&gt;Les changements aux préférences du projet effectuées depuis la dernière fois que cette version de Qt Creator a été utilisée avec ce projet sont ignorés et les changements effectués dès maintenant ne seront &lt;b&gt;pas&lt;/b&gt; propagés à la nouvelle version.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Project Settings File from a different Environment?</source>
......@@ -11345,6 +11345,10 @@ You can choose between stashing the changes or discarding them.</source>
<source>Context Help</source>
<translation>Контекстная справка</translation>
</message>
<message>
<source>Report Bug...</source>
<translation>Сообщить об ошибке...</translation>
</message>
<message>
<source>Activate Index in Help mode</source>
<translation>Показать указатель справки</translation>
......@@ -17973,10 +17977,6 @@ Please build the debugging helpers on the Qt version options page.</source>
</context>
<context>
<name>QmlProfiler::Internal::QmlProfilerTool</name>
<message>
<source>Attach...</source>
<translation>Подключить...</translation>
</message>
<message>
<source>QML Profiler</source>
<translation>Профилер QML</translation>
......@@ -18021,10 +18021,6 @@ Please build the debugging helpers on the Qt version options page.</source>
<source>Elapsed: %1 s</source>
<translation>Прошло: %1 с</translation>
</message>
<message>
<source>Detach</source>
<translation>Отключить</translation>
</message>
</context>
<context>
<name>QmlProfiler::Internal::RemoteLinuxQmlProfilerRunner</name>
......@@ -24258,6 +24254,10 @@ Server list was %2.</source>
</context>
<context>
<name>TextEditor::BaseFileFind</name>
<message>
<source>Search</source>
<translation>Поиск</translation>
</message>
<message>
<source>%1 found</source>
<translation>%1 найдено</translation>
......@@ -19,6 +19,7 @@ TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/qtcreator_,.ts)
MIME_TR_H = $$OUT_PWD/mime_tr.h
CUSTOMWIZARD_TR_H = $$OUT_PWD/customwizard_tr.h
EXTERNALTOOLS_TR_H = $$OUT_PWD/externaltools_tr.h
for(dir, $$list($$files($$IDE_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
......@@ -26,9 +27,13 @@ MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
CUSTOMWIZARD_FILES = \"$$join(CUSTOMWIZARD_FILES, |)\"
for(file, $$list($$files($$IDE_SOURCE_TREE/src/share/qtcreator/externaltools/*))):EXTERNALTOOLS_FILES += $$files($$file)
EXTERNALTOOLS_FILES = \"$$join(EXTERNALTOOLS_FILES, |)\"
extract.commands += \
$$XMLPATTERNS -output $$MIME_TR_H -param files=$$MIMETYPES_FILES $$PWD/extract-mimetypes.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq
$$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$EXTERNALTOOLS_TR_H -param files=$$EXTERNALTOOLS_FILES $$PWD/extract-externaltools.xq
QMAKE_EXTRA_TARGETS += extract
plugin_sources = $$files($$IDE_SOURCE_TREE/src/plugins/*)
......
......@@ -81,7 +81,7 @@ unsigned BaseSpecifierAST::firstToken() const
if (access_specifier_token)
return access_specifier_token;
if (name)
name->firstToken();
return name->firstToken();
// assert?
return 0;
}
......
......@@ -35,6 +35,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qstringlist.h>
#include <QtNetwork/qnetworkproxy.h>
#include <symbiandevicemanager.h>
namespace QmlJsDebugClient {
......@@ -286,6 +287,7 @@ void QDeclarativeDebugConnection::flush()
void QDeclarativeDebugConnection::connectToHost(const QString &hostName, quint16 port)
{
QTcpSocket *socket = new QTcpSocket(d);
socket->setProxy(QNetworkProxy::NoProxy);
d->device = socket;
d->connectDeviceSignals();
d->gotHello = false;
......
......@@ -276,9 +276,9 @@ bool BuildableHelperLibrary::buildHelper(const BuildHelperArguments &arguments,
log->append(newline);
log->append(QCoreApplication::translate("ProjectExplorer::BuildableHelperLibrary",
"Running %1 %2 ...\n").arg(arguments.qmakeCommand,
arguments.qmakeArguments.join(" ")));
qmakeArgs.join(" ")));
if (!runBuildProcess(proc, arguments.qmakeCommand, arguments.qmakeArguments, 30000, false, log, errorMessage))
if (!runBuildProcess(proc, arguments.qmakeCommand, qmakeArgs, 30000, false, log, errorMessage))
return false;
log->append(newline);
if (makeFullPath.isEmpty()) {
......
......@@ -45,6 +45,7 @@
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QXmlStreamReader>
#include <QtCore/QXmlStreamWriter>
#include <QtCore/QDir>
......@@ -316,7 +317,8 @@ static void localizedText(const QStringList &locales, QXmlStreamReader *reader,
}
} else {
if (*currentLocale < 0 && currentText->isEmpty()) {
*currentText = reader->readElementText();
*currentText = QCoreApplication::translate("Core::Internal::ExternalTool",
reader->readElementText().toLatin1().constData());
} else {
reader->skipCurrentElement();
}
......
......@@ -239,13 +239,17 @@ void CppHighlighter::highlightBlock(const QString &text)
int oldState = currentState & 0xff;
int oldBraceDepth = currentState >> 8;
if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {
BaseTextDocumentLayout::FoldValidator foldValidor;
foldValidor.setup(qobject_cast<BaseTextDocumentLayout *>(document()->documentLayout()));
int delta = braceDepth - oldBraceDepth;
QTextBlock block = currentBlock().next();
while (block.isValid() && block.userState() != -1) {
BaseTextDocumentLayout::changeBraceDepth(block, delta);
BaseTextDocumentLayout::changeFoldingIndent(block, delta);
foldValidor.process(block);
block = block.next();
}
foldValidor.finalize();
}
}
......
......@@ -904,7 +904,7 @@ public slots:
{
const QAction *action = qobject_cast<const QAction *>(sender());
QTC_ASSERT(action, return);
const ContextData data = action->data().value<ContextData>();
const BreakpointMenuContextData data = action->data().value<BreakpointMenuContextData>();
currentEngine()->executeRunToLine(data);
}
......@@ -912,7 +912,7 @@ public slots:
{
const QAction *action = qobject_cast<const QAction *>(sender());
QTC_ASSERT(action, return);
const ContextData data = action->data().value<ContextData>();
const BreakpointMenuContextData data = action->data().value<BreakpointMenuContextData>();
currentEngine()->executeJumpToLine(data);
}
......
......@@ -413,7 +413,11 @@ void QmlCppEngine::executeJumpToLine(const ContextData &data)
void QmlCppEngine::executeDebuggerCommand(const QString &command)
{
d->m_cppEngine->executeDebuggerCommand(command);
if (d->m_qmlEngine->state() == InferiorStopOk) {
d->m_qmlEngine->executeDebuggerCommand(command);
} else {
d->m_cppEngine->executeDebuggerCommand(command);
}
}
/////////////////////////////////////////////////////////
......
......@@ -3915,7 +3915,6 @@ void FakeVimHandler::Private::highlightMatches(const QString &needle)
sel.cursor = tc;
sel.format = tc.blockCharFormat();
sel.format.setBackground(QColor(177, 177, 0));
sel.format.setForeground(Qt::black);
m_searchSelections.append(sel);
if (document()->characterAt(tc.position()) == ParagraphSeparator)
tc.movePosition(Right, MoveAnchor);
......
......@@ -997,6 +997,10 @@ bool FakeVimPluginPrivate::initialize()
Constants::INSTALL_HANDLER, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::INSTALL_KEY));
ActionContainer *advancedMenu =
actionManager()->actionContainer(Core::Constants::M_EDIT_ADVANCED);
advancedMenu->addAction(cmd, Core::Constants::G_EDIT_EDITOR);
for (int i = 1; i < 10; ++i) {
QAction *act = new QAction(this);
act->setText(QString("Execute User Action #%1").arg(i));
......@@ -1008,10 +1012,6 @@ bool FakeVimPluginPrivate::initialize()
connect(act, SIGNAL(triggered()), SLOT(userActionTriggered()));
}
ActionContainer *advancedMenu =
actionManager()->actionContainer(Core::Constants::M_EDIT_ADVANCED);
advancedMenu->addAction(cmd, Core::Constants::G_EDIT_EDITOR);
connect(m_core, SIGNAL(coreAboutToClose()), this, SLOT(onCoreAboutToClose()));
// EditorManager
......
......@@ -448,8 +448,11 @@ void BranchModel::checkoutBranch(const QModelIndex &idx)
}
if (m_client->synchronousCheckoutBranch(m_workingDirectory, branch, &errorMessage)) {
if (errorMessage.isEmpty()) {
static_cast<BranchNode *>(currentBranch().internalPointer())->current = false;
emit dataChanged(currentBranch(), currentBranch());
QModelIndex currentIdx = currentBranch();
if (currentIdx.isValid()) {
static_cast<BranchNode *>(currentIdx.internalPointer())->current = false;
emit dataChanged(currentBranch(), currentBranch());
}
static_cast<BranchNode *>(idx.internalPointer())->current = true;
emit dataChanged(idx, idx);
} else {
......
......@@ -575,3 +575,69 @@ QSizeF BaseTextDocumentLayout::documentSize() const
size.setWidth(qMax((qreal)m_requiredWidth, size.width()));
return size;
}
BaseTextDocumentLayout::FoldValidator::FoldValidator()
: m_layout(0)
, m_requestDocUpdate(false)
, m_insideFold(0)
{}
void BaseTextDocumentLayout::FoldValidator::setup(BaseTextDocumentLayout *layout)
{
m_layout = layout;
}
void BaseTextDocumentLayout::FoldValidator::reset()
{
m_insideFold = 0;
m_requestDocUpdate = false;
}
void BaseTextDocumentLayout::FoldValidator::process(QTextBlock block)
{
if (!m_layout)
return;
const QTextBlock &previous = block.previous();
if (!previous.isValid())
return;
if ((BaseTextDocumentLayout::isFolded(previous)
&& !BaseTextDocumentLayout::canFold(previous))
|| (!BaseTextDocumentLayout::isFolded(previous)
&& BaseTextDocumentLayout::canFold(previous)
&& !block.isVisible())) {
BaseTextDocumentLayout::setFolded(previous, !BaseTextDocumentLayout::isFolded(previous));
}
if (BaseTextDocumentLayout::isFolded(previous) && !m_insideFold)
m_insideFold = BaseTextDocumentLayout::foldingIndent(block);
bool toggleVisibility = false;
if (m_insideFold) {
if (BaseTextDocumentLayout::foldingIndent(block) >= m_insideFold) {
if (block.isVisible())
toggleVisibility = true;
} else {
m_insideFold = 0;
if (!block.isVisible())
toggleVisibility = true;
}
} else if (!block.isVisible()) {
toggleVisibility = true;
}
if (toggleVisibility) {
block.setVisible(!block.isVisible());
block.setLineCount(block.isVisible() ? qMax(1, block.layout()->lineCount()) : 0);
m_requestDocUpdate = true;
}
}
void BaseTextDocumentLayout::FoldValidator::finalize()
{
if (m_requestDocUpdate && m_layout) {
m_layout->requestUpdate();
m_layout->emitDocumentSizeChanged();
}
}
......@@ -174,6 +174,22 @@ public:
static bool isFolded(const QTextBlock &block);
static void setFolded(const QTextBlock &block, bool folded);
class TEXTEDITOR_EXPORT FoldValidator
{
public:
FoldValidator();
void setup(BaseTextDocumentLayout *layout);
void reset();
void process(QTextBlock block);
void finalize();
private:
BaseTextDocumentLayout *m_layout;
bool m_requestDocUpdate;
int m_insideFold;
};
static TextBlockUserData *testUserData(const QTextBlock &block) {
return static_cast<TextBlockUserData*>(block.userData());
}
......
......@@ -31,6 +31,7 @@
#include "syntaxhighlighter.h"
#include "basetextdocument.h"
#include "basetextdocumentlayout.h"
#include <qtextdocument.h>
#include <qtextlayout.h>
......@@ -76,10 +77,12 @@ public:
}
void applyFormatChanges(int from, int charsRemoved, int charsAdded);
QVector<QTextCharFormat> formatChanges;
QTextBlock currentBlock;
bool rehighlightPending;
bool inReformatBlocks;
BaseTextDocumentLayout::FoldValidator foldValidator;
};
static bool adjustRange(QTextLayout::FormatRange &range, int from, int charsRemoved, int charsAdded) {
......@@ -180,6 +183,8 @@ void SyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int
void SyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded)
{
foldValidator.reset();
rehighlightPending = false;
QTextBlock block = doc->findBlock(from);
......@@ -206,6 +211,8 @@ void SyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int ch
}
formatChanges.clear();
foldValidator.finalize();
}
void SyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block, int from, int charsRemoved, int charsAdded)
......@@ -220,6 +227,8 @@ void SyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block, int from,
q->highlightBlock(block.text());
applyFormatChanges(from, charsRemoved, charsAdded);
foldValidator.process(currentBlock);
currentBlock = QTextBlock();
}
......@@ -375,6 +384,7 @@ void SyntaxHighlighter::setDocument(QTextDocument *doc)
this, SLOT(_q_reformatBlocks(int,int,int)));
d->rehighlightPending = true;
QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight()));
d->foldValidator.setup(qobject_cast<BaseTextDocumentLayout *>(doc->documentLayout()));
}
}
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="lrelease">
<description>Creates qm translation files that can be used by an application from the translator's ts files</description>
<description xml:lang="de">Erstellt die von Anwendungen nutzbaren qm-Dateien aus ts-Dateien von Übersetzern</description>
<displayname>Release Translations (lrelease)</displayname>
<displayname xml:lang="de">Übersetzungen veröffentlichen (lrelease)</displayname>
<category>Linguist</category>
<category xml:lang="de">Linguist</category>
<order>2</order>
<executable>
<path>%{CurrentProject:QT_INSTALL_BINS}/lrelease</path>
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="lupdate">
<description>Synchronizes translator's ts files with the program code</description>
<description xml:lang="de">Synchronisiert die ts-Übersetzungsdateien mit dem Programmcode</description>
<displayname>Update Translations (lupdate)</displayname>
<displayname xml:lang="de">Übersetzungen aktualisieren (lupdate)</displayname>
<category>Linguist</category>
<category xml:lang="de">Linguist</category>
<order>1</order>
<executable>
<path>%{CurrentProject:QT_INSTALL_BINS}/lupdate</path>
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="notepad">
<description>Opens the current file in Notepad</description>
<description xml:lang="de">Öffnet die aktuelle Datei in Notepad</description>
<displayname>Edit with Notepad</displayname>
<displayname xml:lang="de">In Notepad öffnen</displayname>
<category>Text</category>
<category xml:lang="de">Text</category>
<executable modifiesdocument="yes">
<path>notepad</path>
<arguments>"%{CurrentDocument:FilePath}"</arguments>
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="sort">
<description>Sorts the selected text</description>
<description xml:lang="de">Sortiert den ausgewählten Text</description>
<displayname>Sort Selection</displayname>
<displayname xml:lang="de">Auswahl Sortieren</displayname>
<category>Text</category>
<category xml:lang="de">Text</category>
<executable output="replaceselection" error="ignore">
<path>sort</path>
<input>%{CurrentDocument:Selection}</input>
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="vi">
<description>Opens the current file in vi</description>
<description xml:lang="de">Öffnet die aktuelle Datei in vi</description>
<displayname>Edit with vi</displayname>
<displayname xml:lang="de">In vi öffnen</displayname>
<category>Text</category>
<category xml:lang="de">Text</category>
<executable modifiesdocument="yes">
<path>xterm</path>
<arguments>-geom %{CurrentDocument:ColumnCount}x%{CurrentDocument:RowCount}+%{CurrentDocument:XPos}+%{CurrentDocument:YPos} -e vi "%{CurrentDocument:FilePath}" +%{CurrentDocument:Row}</arguments>
......
......@@ -31,11 +31,8 @@
-->
<externaltool id="vi">
<description>Opens the current file in vi</description>
<description xml:lang="de">Öffnet die aktuelle Datei in vi</description>
<displayname>Edit with vi</displayname>
<displayname xml:lang="de">In vi öffnen</displayname>
<category>Text</category>
<category xml:lang="de">Text</category>
<executable modifiesdocument="yes">
<path>osascript</path>
<input>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment