forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.11' into 4.12
Change-Id: I8cc80483cdb10309bf73aba5cfab52c1d90e1bbc
This commit is contained in:
10
dist/installer/mac/entitlements.plist
vendored
Normal file
10
dist/installer/mac/entitlements.plist
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.cs.debugger</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@@ -238,5 +238,7 @@ def codesign(app_path):
|
|||||||
lambda ff: ff.endswith('.dylib'))
|
lambda ff: ff.endswith('.dylib'))
|
||||||
codesign = codesign_call()
|
codesign = codesign_call()
|
||||||
if is_mac_platform() and codesign:
|
if is_mac_platform() and codesign:
|
||||||
|
entitlements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'dist',
|
||||||
|
'installer', 'mac', 'entitlements.plist')
|
||||||
# sign the whole bundle
|
# sign the whole bundle
|
||||||
subprocess.check_call(codesign + ['--deep', app_path])
|
subprocess.check_call(codesign + ['--deep', app_path, '--entitlements', entitlements_path])
|
||||||
|
@@ -21,6 +21,7 @@ from PyQt5 import QtQuick
|
|||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@if '%{Base}'
|
@if '%{Base}'
|
||||||
class %{Class}(%{Base}):
|
class %{Class}(%{Base}):
|
||||||
@else
|
@else
|
||||||
@@ -29,11 +30,9 @@ class %{Class}:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
@if '%{Base}' === 'QWidget'
|
@if '%{Base}' === 'QWidget'
|
||||||
QtWidgets.QWidget.__init__(self)
|
QtWidgets.QWidget.__init__(self)
|
||||||
@endif
|
@elif '%{Base}' === 'QMainWindow'
|
||||||
@if '%{Base}' === 'QMainWindow'
|
|
||||||
QtWidgets.QMainWindow.__init__(self)
|
QtWidgets.QMainWindow.__init__(self)
|
||||||
@if '%{Base}' === 'QQuickItem'
|
@elif '%{Base}' === 'QQuickItem'
|
||||||
QtQuick.QQuickItem.__init__(self)
|
QtQuick.QQuickItem.__init__(self)
|
||||||
@endif
|
@endif
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"items": [ { "trKey": "<Custom>", "value": "" },
|
"items": [ { "trKey": "<Custom>", "value": "" },
|
||||||
"QObject", "QWidget", "QMainWindow", "QDeclarativeItem" ]
|
"QObject", "QWidget", "QMainWindow", "QDeclarativeItem", "QQuickItem" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# This Python file uses the following encoding: utf-8
|
# This Python file uses the following encoding: utf-8
|
||||||
|
|
||||||
# if__name__ == "__main__":
|
# if __name__ == "__main__":
|
||||||
# pass
|
# pass
|
||||||
|
@@ -475,7 +475,7 @@ void Client::documentContentsChanged(TextEditor::TextDocument *document,
|
|||||||
int charsRemoved,
|
int charsRemoved,
|
||||||
int charsAdded)
|
int charsAdded)
|
||||||
{
|
{
|
||||||
if (!m_openedDocument.contains(document))
|
if (!m_openedDocument.contains(document) || !reachable())
|
||||||
return;
|
return;
|
||||||
const QString method(DidChangeTextDocumentNotification::methodName);
|
const QString method(DidChangeTextDocumentNotification::methodName);
|
||||||
TextDocumentSyncKind syncKind = m_serverCapabilities.textDocumentSyncKindHelper();
|
TextDocumentSyncKind syncKind = m_serverCapabilities.textDocumentSyncKindHelper();
|
||||||
@@ -912,11 +912,12 @@ bool Client::reset()
|
|||||||
m_responseHandlers.clear();
|
m_responseHandlers.clear();
|
||||||
m_clientInterface->resetBuffer();
|
m_clientInterface->resetBuffer();
|
||||||
updateEditorToolBar(m_openedDocument.keys());
|
updateEditorToolBar(m_openedDocument.keys());
|
||||||
m_openedDocument.clear();
|
|
||||||
m_serverCapabilities = ServerCapabilities();
|
m_serverCapabilities = ServerCapabilities();
|
||||||
m_dynamicCapabilities.reset();
|
m_dynamicCapabilities.reset();
|
||||||
for (const DocumentUri &uri : m_diagnostics.keys())
|
for (const DocumentUri &uri : m_diagnostics.keys())
|
||||||
removeDiagnostics(uri);
|
removeDiagnostics(uri);
|
||||||
|
for (TextEditor::TextDocument *document : m_openedDocument.keys())
|
||||||
|
document->disconnect(this);
|
||||||
for (TextEditor::TextDocument *document : m_resetAssistProvider.keys())
|
for (TextEditor::TextDocument *document : m_resetAssistProvider.keys())
|
||||||
resetAssistProviders(document);
|
resetAssistProviders(document);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -366,6 +366,8 @@ void LanguageClientManager::clientFinished(Client *client)
|
|||||||
client->log(tr("Unexpectedly finished. Restarting in %1 seconds.").arg(restartTimeoutS),
|
client->log(tr("Unexpectedly finished. Restarting in %1 seconds.").arg(restartTimeoutS),
|
||||||
Core::MessageManager::Flash);
|
Core::MessageManager::Flash);
|
||||||
QTimer::singleShot(restartTimeoutS * 1000, client, [client]() { startClient(client); });
|
QTimer::singleShot(restartTimeoutS * 1000, client, [client]() { startClient(client); });
|
||||||
|
for (TextEditor::TextDocument *document : m_clientForDocument.keys(client))
|
||||||
|
client->deactivateDocument(document);
|
||||||
} else {
|
} else {
|
||||||
if (unexpectedFinish && !m_shuttingDown)
|
if (unexpectedFinish && !m_shuttingDown)
|
||||||
client->log(tr("Unexpectedly finished."), Core::MessageManager::Flash);
|
client->log(tr("Unexpectedly finished."), Core::MessageManager::Flash);
|
||||||
@@ -397,6 +399,7 @@ void LanguageClientManager::editorOpened(Core::IEditor *editor)
|
|||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
if (Client *client = clientForDocument(widget->textDocument()))
|
if (Client *client = clientForDocument(widget->textDocument()))
|
||||||
|
if (client->reachable())
|
||||||
client->cursorPositionChanged(widget);
|
client->cursorPositionChanged(widget);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -5472,7 +5472,7 @@ void TextEditorWidget::mouseMoveEvent(QMouseEvent *e)
|
|||||||
column += (e->pos().x() - cursorRect().center().x()) / QFontMetricsF(font()).horizontalAdvance(QLatin1Char(' '));
|
column += (e->pos().x() - cursorRect().center().x()) / QFontMetricsF(font()).horizontalAdvance(QLatin1Char(' '));
|
||||||
|
|
||||||
d->m_blockSelection.positionBlock = cursor.blockNumber();
|
d->m_blockSelection.positionBlock = cursor.blockNumber();
|
||||||
d->m_blockSelection.positionColumn = column;
|
d->m_blockSelection.positionColumn = qMax(0, column);
|
||||||
|
|
||||||
doSetTextCursor(d->m_blockSelection.selection(d->m_document.data()), true);
|
doSetTextCursor(d->m_blockSelection.selection(d->m_document.data()), true);
|
||||||
viewport()->update();
|
viewport()->update();
|
||||||
@@ -7166,7 +7166,7 @@ void TextEditorWidget::rewrapParagraph()
|
|||||||
QString currentWord;
|
QString currentWord;
|
||||||
|
|
||||||
for (const QChar &ch : qAsConst(selectedText)) {
|
for (const QChar &ch : qAsConst(selectedText)) {
|
||||||
if (ch.isSpace()) {
|
if (ch.isSpace() && ch != QChar::Nbsp) {
|
||||||
if (!currentWord.isEmpty()) {
|
if (!currentWord.isEmpty()) {
|
||||||
currentLength += currentWord.length() + 1;
|
currentLength += currentWord.length() + 1;
|
||||||
|
|
||||||
@@ -8057,10 +8057,10 @@ QTextCursor TextBlockSelection::cursor(const TextDocument *baseTextDocument,
|
|||||||
void TextBlockSelection::fromPostition(int positionBlock, int positionColumn,
|
void TextBlockSelection::fromPostition(int positionBlock, int positionColumn,
|
||||||
int anchorBlock, int anchorColumn)
|
int anchorBlock, int anchorColumn)
|
||||||
{
|
{
|
||||||
this->positionBlock = positionBlock;
|
this->positionBlock = QTC_GUARD(positionBlock >= 0) ? positionBlock : 0;
|
||||||
this->positionColumn = positionColumn;
|
this->positionColumn = QTC_GUARD(positionColumn >= 0) ? positionColumn : 0;
|
||||||
this->anchorBlock = anchorBlock;
|
this->anchorBlock = QTC_GUARD(anchorBlock >= 0) ? anchorBlock : 0;
|
||||||
this->anchorColumn = anchorColumn;
|
this->anchorColumn = QTC_GUARD(anchorColumn >= 0) ? anchorColumn : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TextEditorWidget::inFindScope(const QTextCursor &cursor)
|
bool TextEditorWidget::inFindScope(const QTextCursor &cursor)
|
||||||
|
Reference in New Issue
Block a user