Skip to content

Commit 1918c48

Browse files
committed
TextBrowserDialog: include what you use
1 parent 05cf531 commit 1918c48

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

code-check-wrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ for I in \
114114
template_tool \
115115
template_track.cpp \
116116
text_object_editor_helper.cpp \
117-
text_brwoser_dialog \
117+
text_browser_dialog \
118118
toast.cpp \
119119
track_t.cpp \
120120
/track.cpp \

src/gui/text_browser_dialog.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@
2121
#include "text_browser_dialog.h"
2222

2323
#include <Qt>
24+
#include <QtGlobal>
25+
#include <QAbstractButton>
2426
#include <QApplication>
2527
#include <QHBoxLayout>
2628
#include <QIcon>
29+
#include <QPoint>
2730
#include <QPushButton>
2831
#include <QScrollBar>
2932
#include <QScroller> // IWYU pragma: keep
33+
#include <QSizeF>
3034
#include <QString>
3135
#include <QTextBrowser>
36+
#include <QTextDocument>
37+
#include <QTextEdit>
3238
#include <QToolTip>
3339
#include <QVBoxLayout>
40+
#include <QWidget>
3441

3542
#include "gui/widgets/text_browser.h"
3643
#include "util/backports.h" // IWYU pragma: keep
@@ -47,7 +54,7 @@ TextBrowserDialog::TextBrowserDialog(QWidget* parent)
4754
setWindowModality(Qt::WindowModal);
4855
}
4956

50-
QVBoxLayout* layout = new QVBoxLayout();
57+
auto* layout = new QVBoxLayout();
5158
setLayout(layout);
5259

5360
int left, top, right, bottom;
@@ -58,7 +65,7 @@ TextBrowserDialog::TextBrowserDialog(QWidget* parent)
5865
text_browser->setOpenExternalLinks(true);
5966
layout->addWidget(text_browser);
6067

61-
QHBoxLayout* buttons_layout = new QHBoxLayout();
68+
auto* buttons_layout = new QHBoxLayout();
6269
buttons_layout->setContentsMargins(left, top, right, bottom);
6370

6471
QPushButton* back_button = new QPushButton(QIcon(QStringLiteral(":/images/arrow-left.png")), QApplication::translate("QFileDialog", "Back"));
@@ -122,7 +129,7 @@ QSize TextBrowserDialog::sizeHint() const
122129
return size;
123130
}
124131

125-
void TextBrowserDialog::sourceChanged(const QUrl&)
132+
void TextBrowserDialog::sourceChanged(const QUrl& /* unused */)
126133
{
127134
; // Nothing, to be overridden in subclasses
128135
}

src/gui/text_browser_dialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
#include <QDialog>
2525
#include <QObject>
2626
#include <QSize>
27+
#include <QString>
2728

2829
class QWidget;
2930

30-
class QString;
3131
class QTextBrowser;
3232
class QUrl;
3333

0 commit comments

Comments
 (0)