forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/14.0'"
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
<h2>Reference</h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="creator-acknowledgements.html">Acknowledgements</a></li>
|
||||
<li><a href="creator-acknowledgements.html">Licenses and Acknowledgments</a></li>
|
||||
<li><a href="creator-cli.html">Command-Line Options</a></li>
|
||||
<li><a href="creator-project-wizards.html">Custom Wizards</a></li>
|
||||
<li><a href="creator-faq.html">FAQ</a></li>
|
||||
|
@@ -88,5 +88,6 @@
|
||||
{Compiling \QC} and \l{https://wiki.qt.io/Building_Qt_Creator_from_Git}
|
||||
{Building Qt Creator from Git}.
|
||||
|
||||
\sa {Manage Kits}{How To: Manage Kits}, {Register installed Qt versions}
|
||||
\sa {Manage Kits}{How To: Manage Kits}, {Register installed Qt versions},
|
||||
{Install plugins}, {Licenses and Acknowledgments}
|
||||
*/
|
||||
|
@@ -17,9 +17,15 @@
|
||||
|
||||
\ingroup creator-reference
|
||||
|
||||
\title Acknowledgements
|
||||
\title Licenses and Acknowledgments
|
||||
|
||||
\brief Third-party components in \QC.
|
||||
\brief Licenses and third-party components in \QC.
|
||||
|
||||
\section1 Licenses
|
||||
|
||||
\QC is available under commercial licenses from The Qt Company, and
|
||||
under the GNU General Public License version 3, annotated with
|
||||
The Qt Company GPL Exception 1.0.
|
||||
|
||||
\section1 Credits
|
||||
|
||||
|
@@ -272,7 +272,7 @@
|
||||
\li \l{Supported Platforms}
|
||||
\endlist
|
||||
\li \l{Technical Support}
|
||||
\li \l{Acknowledgements}
|
||||
\li \l{Licenses and Acknowledgments}
|
||||
\li \l{What's New}
|
||||
\endlist
|
||||
*/
|
||||
|
@@ -7,11 +7,11 @@ set(CMAKE_AUTOMOC ON)
|
||||
@endif
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 %{MinimumSupportedQtVersion} REQUIRED COMPONENTS Quick)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Quick)
|
||||
|
||||
@if %{HasQSPSetup}
|
||||
@if %{UsesAutoResourcePrefix}
|
||||
qt_standard_project_setup(REQUIRES 6.5)
|
||||
qt_standard_project_setup(REQUIRES %{MinimumSupportedQtVersion})
|
||||
@else
|
||||
qt_standard_project_setup()
|
||||
@endif
|
||||
|
@@ -22,8 +22,7 @@ ToolButton {
|
||||
smooth: false
|
||||
}
|
||||
|
||||
background: PaddedRectangle {
|
||||
padding: Theme.compactToolbar() ? 0 : 3
|
||||
background: Rectangle {
|
||||
radius: Theme.compactToolbar() ? 0 : 5
|
||||
color: (parent.checked || parent.pressed)
|
||||
? Theme.color(Theme.FancyToolButtonSelectedColor)
|
||||
|
@@ -287,6 +287,12 @@ public:
|
||||
theWidget, [this](const QModelIndex &index) { onItemDoubleClicked(index); });
|
||||
}
|
||||
|
||||
~HierarchyWidgetHelper()
|
||||
{
|
||||
if (m_runningRequest && m_runningRequest->first)
|
||||
m_runningRequest->first->cancelRequest(m_runningRequest->second);
|
||||
}
|
||||
|
||||
void updateHierarchyAtCursorPosition()
|
||||
{
|
||||
m_model.clear();
|
||||
@@ -315,6 +321,17 @@ protected:
|
||||
item->forChildrenAtLevel(1, [&](const TreeItem *child) { m_view->expand(child->index()); });
|
||||
}
|
||||
|
||||
void send(Client *client, const JsonRpcMessage &request, const MessageId &requestId)
|
||||
{
|
||||
m_runningRequest = std::make_pair(QPointer<Client>(client), requestId);
|
||||
client->sendMessage(request);
|
||||
}
|
||||
|
||||
void resetRunningRequest()
|
||||
{
|
||||
m_runningRequest.reset();
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void sendRequest(Client *client, const TextDocumentPositionParams ¶ms,
|
||||
const Core::IDocument *document) = 0;
|
||||
@@ -334,6 +351,7 @@ private:
|
||||
|
||||
AnnotatedItemDelegate m_delegate;
|
||||
NavigationTreeView * const m_view;
|
||||
std::optional<std::pair<QPointer<Client>, MessageId>> m_runningRequest;
|
||||
TreeModel<TreeItem> m_model;
|
||||
};
|
||||
|
||||
@@ -358,12 +376,13 @@ private:
|
||||
const PrepareCallHierarchyRequest::Response &response) {
|
||||
handlePrepareResponse(client, response);
|
||||
});
|
||||
client->sendMessage(request);
|
||||
send(client, request, request.id());
|
||||
}
|
||||
|
||||
void handlePrepareResponse(Client *client,
|
||||
const PrepareCallHierarchyRequest::Response &response)
|
||||
{
|
||||
resetRunningRequest();
|
||||
if (!client)
|
||||
return;
|
||||
const std::optional<PrepareCallHierarchyRequest::Response::Error> error = response.error();
|
||||
@@ -401,12 +420,13 @@ private:
|
||||
const PrepareTypeHierarchyRequest::Response &response) {
|
||||
handlePrepareResponse(client, response);
|
||||
});
|
||||
client->sendMessage(request);
|
||||
send(client, request, request.id());
|
||||
}
|
||||
|
||||
void handlePrepareResponse(Client *client,
|
||||
const PrepareTypeHierarchyRequest::Response &response)
|
||||
{
|
||||
resetRunningRequest();
|
||||
if (!client)
|
||||
return;
|
||||
const std::optional<PrepareTypeHierarchyRequest::Response::Error> error = response.error();
|
||||
|
@@ -103,6 +103,7 @@ bool FontSettings::fromSettings(const FormatDescriptions &descriptions, const Qt
|
||||
m_fontSize = s->value(group + fontSizeKey, m_fontSize).toInt();
|
||||
m_fontZoom= s->value(group + fontZoomKey, m_fontZoom).toInt();
|
||||
m_lineSpacing = s->value(group + lineSpacingKey, m_lineSpacing).toInt();
|
||||
QTC_ASSERT(m_lineSpacing >= 0, m_lineSpacing = 100);
|
||||
m_antialias = s->value(group + antialiasKey, DEFAULT_ANTIALIAS).toBool();
|
||||
|
||||
if (s->contains(group + schemeFileNamesKey)) {
|
||||
@@ -337,7 +338,7 @@ qreal FontSettings::lineSpacing() const
|
||||
QFont currentFont = font();
|
||||
currentFont.setPointSize(std::max(m_fontSize * m_fontZoom / 100, 1));
|
||||
qreal spacing = QFontMetricsF(currentFont).lineSpacing();
|
||||
if (m_lineSpacing != 100)
|
||||
if (QTC_GUARD(m_lineSpacing > 0) && m_lineSpacing != 100)
|
||||
spacing *= qreal(m_lineSpacing) / 100;
|
||||
return spacing;
|
||||
}
|
||||
|
@@ -5185,6 +5185,7 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data,
|
||||
q->viewport()->update(annotationRect.rect.toAlignedRect());
|
||||
}
|
||||
m_annotationRects[data.block.blockNumber()] = newRects;
|
||||
QTC_ASSERT(data.lineSpacing != 0, return);
|
||||
const int maxVisibleLines = data.viewportRect.height() / data.lineSpacing;
|
||||
if (m_annotationRects.size() >= maxVisibleLines * 2)
|
||||
scheduleCleanupAnnotationCache();
|
||||
|
Reference in New Issue
Block a user