TextEditor: remove texteditor_p.h

There is no need to have an extra file for one struct that is only used
inside texteditor.cpp

Change-Id: Iee8f7ce5e0d19da7b444660d81c350eb10b501ef
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2023-10-09 14:16:30 +02:00
committed by hjk
parent 772546453a
commit 4a081cb386
4 changed files with 13 additions and 39 deletions

View File

@@ -103,7 +103,6 @@ add_qtc_plugin(TextEditor
texteditor.qrc
texteditor_global.h
texteditortr.h
texteditor_p.h
texteditoractionhandler.cpp texteditoractionhandler.h
texteditorconstants.cpp texteditorconstants.h
texteditoroverlay.cpp texteditoroverlay.h

View File

@@ -27,7 +27,6 @@
#include "tabsettings.h"
#include "textdocument.h"
#include "textdocumentlayout.h"
#include "texteditor_p.h"
#include "texteditoractionhandler.h"
#include "texteditorconstants.h"
#include "texteditoroverlay.h"
@@ -563,6 +562,19 @@ struct PaintEventBlockData
struct ExtraAreaPaintEventData;
struct TextEditorPrivateHighlightBlocks
{
QList<int> open;
QList<int> close;
QList<int> visualIndent;
inline int count() const { return visualIndent.size(); }
inline bool isEmpty() const { return open.isEmpty() || close.isEmpty() || visualIndent.isEmpty(); }
inline bool operator==(const TextEditorPrivateHighlightBlocks &o) const {
return (open == o.open && close == o.close && visualIndent == o.visualIndent);
}
inline bool operator!=(const TextEditorPrivateHighlightBlocks &o) const { return !(*this == o); }
};
class TextEditorWidgetPrivate : public QObject
{
public:

View File

@@ -134,7 +134,6 @@ QtcPlugin {
"texteditor.h",
"texteditor.qrc",
"texteditor_global.h", "texteditortr.h",
"texteditor_p.h",
"texteditoractionhandler.cpp",
"texteditoractionhandler.h",
"texteditorconstants.cpp",

View File

@@ -1,36 +0,0 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "texteditor_global.h"
#include <QList>
#include <QTextCursor>
namespace TextEditor {
class TextDocument;
namespace Internal {
//
// TextEditorPrivate
//
struct TextEditorPrivateHighlightBlocks
{
QList<int> open;
QList<int> close;
QList<int> visualIndent;
inline int count() const { return visualIndent.size(); }
inline bool isEmpty() const { return open.isEmpty() || close.isEmpty() || visualIndent.isEmpty(); }
inline bool operator==(const TextEditorPrivateHighlightBlocks &o) const {
return (open == o.open && close == o.close && visualIndent == o.visualIndent);
}
inline bool operator!=(const TextEditorPrivateHighlightBlocks &o) const { return !(*this == o); }
};
} // namespace Internal
} // namespace TextEditor