forked from qt-creator/qt-creator
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:
@@ -103,7 +103,6 @@ add_qtc_plugin(TextEditor
|
|||||||
texteditor.qrc
|
texteditor.qrc
|
||||||
texteditor_global.h
|
texteditor_global.h
|
||||||
texteditortr.h
|
texteditortr.h
|
||||||
texteditor_p.h
|
|
||||||
texteditoractionhandler.cpp texteditoractionhandler.h
|
texteditoractionhandler.cpp texteditoractionhandler.h
|
||||||
texteditorconstants.cpp texteditorconstants.h
|
texteditorconstants.cpp texteditorconstants.h
|
||||||
texteditoroverlay.cpp texteditoroverlay.h
|
texteditoroverlay.cpp texteditoroverlay.h
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include "tabsettings.h"
|
#include "tabsettings.h"
|
||||||
#include "textdocument.h"
|
#include "textdocument.h"
|
||||||
#include "textdocumentlayout.h"
|
#include "textdocumentlayout.h"
|
||||||
#include "texteditor_p.h"
|
|
||||||
#include "texteditoractionhandler.h"
|
#include "texteditoractionhandler.h"
|
||||||
#include "texteditorconstants.h"
|
#include "texteditorconstants.h"
|
||||||
#include "texteditoroverlay.h"
|
#include "texteditoroverlay.h"
|
||||||
@@ -563,6 +562,19 @@ struct PaintEventBlockData
|
|||||||
|
|
||||||
struct ExtraAreaPaintEventData;
|
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
|
class TextEditorWidgetPrivate : public QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -134,7 +134,6 @@ QtcPlugin {
|
|||||||
"texteditor.h",
|
"texteditor.h",
|
||||||
"texteditor.qrc",
|
"texteditor.qrc",
|
||||||
"texteditor_global.h", "texteditortr.h",
|
"texteditor_global.h", "texteditortr.h",
|
||||||
"texteditor_p.h",
|
|
||||||
"texteditoractionhandler.cpp",
|
"texteditoractionhandler.cpp",
|
||||||
"texteditoractionhandler.h",
|
"texteditoractionhandler.h",
|
||||||
"texteditorconstants.cpp",
|
"texteditorconstants.cpp",
|
||||||
|
@@ -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
|
|
Reference in New Issue
Block a user