forked from qt-creator/qt-creator
Merge remote-tracking branch 'gerrit/12.0'
Conflicts: src/plugins/texteditor/texteditor.cpp Change-Id: I76620975760a8f9e64f6d381c948d457e949a87c
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
../../qt/qt5.git:
|
../../qt/qt5.git:
|
||||||
ref: "6.5"
|
ref: "6.6"
|
||||||
|
|
||||||
|
@@ -111,7 +111,7 @@
|
|||||||
You can add a library into a \e subdirs project. Use wizards to create the
|
You can add a library into a \e subdirs project. Use wizards to create the
|
||||||
project and the library and to link the library against the project.
|
project and the library and to link the library against the project.
|
||||||
|
|
||||||
\note This tutorial only applies when you select qmake as the the build
|
\note This tutorial only applies when you select qmake as the build
|
||||||
system for the subdirs project.
|
system for the subdirs project.
|
||||||
|
|
||||||
\section1 Creating a shared library
|
\section1 Creating a shared library
|
||||||
|
@@ -268,6 +268,7 @@ void InfoBarDisplay::update()
|
|||||||
{
|
{
|
||||||
for (QWidget *widget : std::as_const(m_infoWidgets)) {
|
for (QWidget *widget : std::as_const(m_infoWidgets)) {
|
||||||
widget->disconnect(this); // We want no destroyed() signal now
|
widget->disconnect(this); // We want no destroyed() signal now
|
||||||
|
widget->hide(); // Late deletion can cause duplicate infos. Hide immediately to prevent it.
|
||||||
widget->deleteLater();
|
widget->deleteLater();
|
||||||
}
|
}
|
||||||
m_infoWidgets.clear();
|
m_infoWidgets.clear();
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
#include <utils/infolabel.h>
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@@ -93,8 +94,6 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
|||||||
topLayout->addWidget(m_topReplaceWidget);
|
topLayout->addWidget(m_topReplaceWidget);
|
||||||
|
|
||||||
m_messageWidget = new QFrame;
|
m_messageWidget = new QFrame;
|
||||||
pal.setColor(QPalette::WindowText, creatorTheme()->color(Theme::TextColorError));
|
|
||||||
m_messageWidget->setPalette(pal);
|
|
||||||
if (creatorTheme()->flag(Theme::DrawSearchResultWidgetFrame)) {
|
if (creatorTheme()->flag(Theme::DrawSearchResultWidgetFrame)) {
|
||||||
m_messageWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
|
m_messageWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
|
||||||
m_messageWidget->setLineWidth(1);
|
m_messageWidget->setLineWidth(1);
|
||||||
@@ -103,8 +102,9 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
|||||||
auto messageLayout = new QHBoxLayout(m_messageWidget);
|
auto messageLayout = new QHBoxLayout(m_messageWidget);
|
||||||
messageLayout->setContentsMargins(2, 2, 2, 2);
|
messageLayout->setContentsMargins(2, 2, 2, 2);
|
||||||
m_messageWidget->setLayout(messageLayout);
|
m_messageWidget->setLayout(messageLayout);
|
||||||
m_messageLabel = new QLabel;
|
m_messageLabel = new InfoLabel;
|
||||||
m_messageLabel->setPalette(pal);
|
m_messageLabel->setType(InfoLabel::Error);
|
||||||
|
m_messageLabel->setFilled(true);
|
||||||
messageLayout->addWidget(m_messageLabel);
|
messageLayout->addWidget(m_messageLabel);
|
||||||
layout->addWidget(m_messageWidget);
|
layout->addWidget(m_messageWidget);
|
||||||
m_messageWidget->setVisible(false);
|
m_messageWidget->setVisible(false);
|
||||||
|
@@ -18,6 +18,7 @@ class QToolButton;
|
|||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils { class InfoLabel; }
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -123,7 +124,7 @@ private:
|
|||||||
QWidget *m_descriptionContainer = nullptr;
|
QWidget *m_descriptionContainer = nullptr;
|
||||||
QLabel *m_label = nullptr;
|
QLabel *m_label = nullptr;
|
||||||
QLabel *m_searchTerm = nullptr;
|
QLabel *m_searchTerm = nullptr;
|
||||||
QLabel *m_messageLabel = nullptr;
|
Utils::InfoLabel *m_messageLabel = nullptr;
|
||||||
QToolButton *m_cancelButton = nullptr;
|
QToolButton *m_cancelButton = nullptr;
|
||||||
QLabel *m_matchesFoundLabel = nullptr;
|
QLabel *m_matchesFoundLabel = nullptr;
|
||||||
bool m_preserveCaseSupported = true;
|
bool m_preserveCaseSupported = true;
|
||||||
|
@@ -1953,25 +1953,30 @@ LookupResult lookUpDefinition(const CppQuickFixInterface &interface, const NameA
|
|||||||
// Try to find the class/template definition
|
// Try to find the class/template definition
|
||||||
const Name *name = nameAst->name;
|
const Name *name = nameAst->name;
|
||||||
const QList<LookupItem> results = interface.context().lookup(name, scope);
|
const QList<LookupItem> results = interface.context().lookup(name, scope);
|
||||||
|
LookupResult best = LookupResult::NotDeclared;
|
||||||
for (const LookupItem &item : results) {
|
for (const LookupItem &item : results) {
|
||||||
if (Symbol *declaration = item.declaration()) {
|
if (Symbol *declaration = item.declaration()) {
|
||||||
if (declaration->asClass())
|
if (declaration->asClass())
|
||||||
return LookupResult::Declared;
|
return LookupResult::Declared;
|
||||||
if (declaration->asForwardClassDeclaration())
|
if (declaration->asForwardClassDeclaration()) {
|
||||||
return LookupResult::ForwardDeclared;
|
best = LookupResult::ForwardDeclared;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (Template *templ = declaration->asTemplate()) {
|
if (Template *templ = declaration->asTemplate()) {
|
||||||
if (Symbol *declaration = templ->declaration()) {
|
if (Symbol *declaration = templ->declaration()) {
|
||||||
if (declaration->asClass())
|
if (declaration->asClass())
|
||||||
return LookupResult::Declared;
|
return LookupResult::Declared;
|
||||||
if (declaration->asForwardClassDeclaration())
|
if (declaration->asForwardClassDeclaration()) {
|
||||||
return LookupResult::ForwardDeclared;
|
best = LookupResult::ForwardDeclared;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return LookupResult::Declared;
|
return LookupResult::Declared;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return LookupResult::NotDeclared;
|
return best;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString templateNameAsString(const TemplateNameId *templateName)
|
QString templateNameAsString(const TemplateNameId *templateName)
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
extend_qtc_plugin(McuSupport
|
extend_qtc_plugin(McuSupport
|
||||||
CONDITION WITH_TESTS AND TARGET Googletest
|
CONDITION WITH_TESTS AND TARGET Googletest
|
||||||
DEPENDS Googletest
|
DEPENDS Googletest
|
||||||
|
DEFINES GOOGLE_TEST_IS_FOUND
|
||||||
SOURCES
|
SOURCES
|
||||||
unittest.h unittest.cpp
|
unittest.h unittest.cpp
|
||||||
packagemock.h
|
packagemock.h
|
||||||
|
@@ -821,7 +821,11 @@ void Project::createTargetFromMap(const Store &map, int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Kit *k = KitManager::kit(id);
|
Kit *k = KitManager::kit(id);
|
||||||
if (!k && !ICore::isQtDesignStudio()) {
|
if (!k) {
|
||||||
|
// QDS does not want replacement kits.
|
||||||
|
if (ICore::isQtDesignStudio())
|
||||||
|
return;
|
||||||
|
|
||||||
Id deviceTypeId = Id::fromSetting(targetMap.value(Target::deviceTypeKey()));
|
Id deviceTypeId = Id::fromSetting(targetMap.value(Target::deviceTypeKey()));
|
||||||
if (!deviceTypeId.isValid())
|
if (!deviceTypeId.isValid())
|
||||||
deviceTypeId = Constants::DESKTOP_DEVICE_TYPE;
|
deviceTypeId = Constants::DESKTOP_DEVICE_TYPE;
|
||||||
|
@@ -15,5 +15,6 @@ constexpr char CLEARSELECTION[] = "Terminal.ClearSelection";
|
|||||||
constexpr char MOVECURSORWORDLEFT[] = "Terminal.MoveCursorWordLeft";
|
constexpr char MOVECURSORWORDLEFT[] = "Terminal.MoveCursorWordLeft";
|
||||||
constexpr char MOVECURSORWORDRIGHT[] = "Terminal.MoveCursorWordRight";
|
constexpr char MOVECURSORWORDRIGHT[] = "Terminal.MoveCursorWordRight";
|
||||||
constexpr char CLEAR_TERMINAL[] = "Terminal.ClearTerminal";
|
constexpr char CLEAR_TERMINAL[] = "Terminal.ClearTerminal";
|
||||||
|
constexpr char TOGGLE_KEYBOARD_LOCK[] = "Terminal.ToggleKeyboardLock";
|
||||||
|
|
||||||
} // namespace Terminal::Constants
|
} // namespace Terminal::Constants
|
||||||
|
@@ -125,6 +125,8 @@ TerminalPane::TerminalPane(QObject *parent)
|
|||||||
|
|
||||||
updateLockButton();
|
updateLockButton();
|
||||||
|
|
||||||
|
connect(&toggleKeyboardLock, &QAction::triggered, m_lockKeyboardButton, &QToolButton::toggle);
|
||||||
|
|
||||||
connect(m_lockKeyboardButton, &QToolButton::toggled, this, [this, updateLockButton] {
|
connect(m_lockKeyboardButton, &QToolButton::toggled, this, [this, updateLockButton] {
|
||||||
settings().lockKeyboard.setValue(m_lockKeyboardButton->isChecked());
|
settings().lockKeyboard.setValue(m_lockKeyboardButton->isChecked());
|
||||||
updateLockButton();
|
updateLockButton();
|
||||||
@@ -292,6 +294,8 @@ void TerminalPane::initActions()
|
|||||||
closeTerminal.setIcon(CLOSE_TERMINAL_ICON.icon());
|
closeTerminal.setIcon(CLOSE_TERMINAL_ICON.icon());
|
||||||
closeTerminal.setToolTip(Tr::tr("Close the current Terminal."));
|
closeTerminal.setToolTip(Tr::tr("Close the current Terminal."));
|
||||||
|
|
||||||
|
toggleKeyboardLock.setText(Tr::tr("Toggle Keyboard Lock"));
|
||||||
|
|
||||||
using namespace Constants;
|
using namespace Constants;
|
||||||
|
|
||||||
Command *cmd = ActionManager::registerAction(&newTerminal, NEWTERMINAL, m_selfContext);
|
Command *cmd = ActionManager::registerAction(&newTerminal, NEWTERMINAL, m_selfContext);
|
||||||
@@ -310,6 +314,10 @@ void TerminalPane::initActions()
|
|||||||
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+]")
|
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+]")
|
||||||
: QLatin1String("Ctrl+PgDown"))});
|
: QLatin1String("Ctrl+PgDown"))});
|
||||||
|
|
||||||
|
ActionManager::registerAction(&toggleKeyboardLock,
|
||||||
|
TOGGLE_KEYBOARD_LOCK,
|
||||||
|
m_selfContext);
|
||||||
|
|
||||||
connect(&newTerminal, &QAction::triggered, this, [this] { openTerminal({}); });
|
connect(&newTerminal, &QAction::triggered, this, [this] { openTerminal({}); });
|
||||||
connect(&closeTerminal, &QAction::triggered, this, [this] {
|
connect(&closeTerminal, &QAction::triggered, this, [this] {
|
||||||
removeTab(m_tabWidget.currentIndex());
|
removeTab(m_tabWidget.currentIndex());
|
||||||
|
@@ -66,6 +66,7 @@ private:
|
|||||||
QAction nextTerminal;
|
QAction nextTerminal;
|
||||||
QAction prevTerminal;
|
QAction prevTerminal;
|
||||||
QAction closeTerminal;
|
QAction closeTerminal;
|
||||||
|
QAction toggleKeyboardLock;
|
||||||
|
|
||||||
QMenu m_shellMenu;
|
QMenu m_shellMenu;
|
||||||
|
|
||||||
|
@@ -571,6 +571,12 @@ bool TerminalWidget::event(QEvent *event)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings().lockKeyboard()
|
||||||
|
&& QKeySequence(keyEvent->keyCombination())
|
||||||
|
== ActionManager::command(Constants::TOGGLE_KEYBOARD_LOCK)->keySequence()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings().lockKeyboard()) {
|
if (settings().lockKeyboard()) {
|
||||||
event->accept();
|
event->accept();
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user