Merge remote-tracking branch 'origin/13.0'

Conflicts:
	src/plugins/languageclient/languageclientutils.cpp

Change-Id: I8d1945f79d93cecee9b22f409bc5f2eefaf6a4cd
This commit is contained in:
Eike Ziller
2024-04-26 09:43:02 +02:00
6 changed files with 23 additions and 5 deletions

View File

@@ -197,7 +197,8 @@ FileSaver::FileSaver(const FilePath &filePath, QIODevice::OpenMode mode)
m_file.reset(tf); m_file.reset(tf);
} else { } else {
const bool readOnlyOrAppend = mode & (QIODevice::ReadOnly | QIODevice::Append); const bool readOnlyOrAppend = mode & (QIODevice::ReadOnly | QIODevice::Append);
m_isSafe = !readOnlyOrAppend && !filePath.hasHardLinks(); m_isSafe = !readOnlyOrAppend && !filePath.hasHardLinks()
&& !qtcEnvironmentVariableIsSet("QTC_DISABLE_ATOMICSAVE");
if (m_isSafe) if (m_isSafe)
m_file.reset(new SaveFile(filePath)); m_file.reset(new SaveFile(filePath));
else else

View File

@@ -30,6 +30,7 @@
#include <projectexplorer/runcontrol.h> #include <projectexplorer/runcontrol.h>
#include <utils/algorithm.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
#include <utils/processinterface.h> #include <utils/processinterface.h>
@@ -328,6 +329,16 @@ void LldbEngine::handleLldbStarted()
runEngine(); runEngine();
}; };
runCommand(cmd3); runCommand(cmd3);
// Execute post attach commands
QStringList commands = settings().gdbPostAttachCommands().split('\n');
commands = Utils::filtered(commands, [](const QString line) {
const QString trimmed = line.trimmed();
return !trimmed.isEmpty() && !trimmed.startsWith('#');
});
for (const QString &cmd : commands) {
executeDebuggerCommand(cmd);
}
} else { } else {
notifyEngineSetupFailed(); notifyEngineSetupFailed();
} }

View File

@@ -235,7 +235,7 @@ void updateEditorToolBar(Core::IEditor *editor)
TextDocument *document = textEditor->textDocument(); TextDocument *document = textEditor->textDocument();
Client *client = LanguageClientManager::clientForDocument(textEditor->textDocument()); Client *client = LanguageClientManager::clientForDocument(textEditor->textDocument());
ClientExtras *extras = static_cast<ClientExtras *>( ClientExtras *extras = dynamic_cast<ClientExtras *>(
widget->findChild<QObject *>(clientExtrasName, Qt::FindDirectChildrenOnly)); widget->findChild<QObject *>(clientExtrasName, Qt::FindDirectChildrenOnly));
if (!extras) { if (!extras) {
if (!client) if (!client)

View File

@@ -750,6 +750,9 @@ static Utils::FilePath qmllsForFile(const Utils::FilePath &file,
void QmlJSEditorDocumentPrivate::settingsChanged() void QmlJSEditorDocumentPrivate::settingsChanged()
{ {
if (q->isTemporary())
return;
Utils::FilePath newQmlls = qmllsForFile(q->filePath(), ModelManagerInterface::instance()); Utils::FilePath newQmlls = qmllsForFile(q->filePath(), ModelManagerInterface::instance());
if (m_qmllsStatus.qmllsPath == newQmlls) if (m_qmllsStatus.qmllsPath == newQmlls)
return; return;

View File

@@ -7471,7 +7471,8 @@ void TextEditorWidgetPrivate::handleBackspaceKey()
} }
} }
} else if (typingSettings.m_smartBackspaceBehavior == TypingSettings::BackspaceUnindents) { } else if (typingSettings.m_smartBackspaceBehavior == TypingSettings::BackspaceUnindents) {
if (c.positionInBlock() > TabSettings::firstNonSpace(c.block().text())) { if (c.positionInBlock() == 0
|| c.positionInBlock() > TabSettings::firstNonSpace(c.block().text())) {
if (cursorWithinSnippet) if (cursorWithinSnippet)
c.beginEditBlock(); c.beginEditBlock();
c.deletePreviousChar(); c.deletePreviousChar();

View File

@@ -25,7 +25,9 @@ def main():
openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'" openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'"
"text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1) "text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1)
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName...")) activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
typeLines(waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit"), buttonName) buttonNameEdit = waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit")
replaceEditorContent(buttonNameEdit, buttonName)
type(buttonNameEdit, "<Return>")
else: else:
# Verify that everything works without ever changing the name # Verify that everything works without ever changing the name
buttonName = "pushButton" buttonName = "pushButton"