refactor: misc fixes

This commit is contained in:
tobtoht 2023-03-29 10:14:20 +02:00
parent 57b0be6ef2
commit afbbeee44f
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
8 changed files with 6 additions and 13 deletions

View file

@ -3,6 +3,7 @@
#include "WindowManager.h" #include "WindowManager.h"
#include <QApplication>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QInputDialog> #include <QInputDialog>
#include <QMessageBox> #include <QMessageBox>

View file

@ -6,7 +6,6 @@
#include <QTreeView> #include <QTreeView>
#include <QKeyEvent> #include <QKeyEvent>
#include <QApplication>
#include <QClipboard> #include <QClipboard>
class SubaddressView : public QTreeView class SubaddressView : public QTreeView

View file

@ -1,12 +1,13 @@
// SPDX-License-Identifier: BSD-3-Clause // SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2023 The Monero Project // SPDX-FileCopyrightText: 2020-2023 The Monero Project
#include <QApplication>
#include <QMessageBox> #include <QMessageBox>
#include <QtNetwork>
#include <QClipboard> #include <QClipboard>
#include <QDesktopServices> #include <QDesktopServices>
#include <QPushButton> #include <QPushButton>
#include <QFontDatabase> #include <QFontDatabase>
#include <QTcpSocket>
#include "constants.h" #include "constants.h"
#include "networktype.h" #include "networktype.h"
@ -25,7 +26,7 @@ bool fileExists(const QString &path) {
QByteArray fileOpen(const QString &path) { QByteArray fileOpen(const QString &path) {
QFile file(path); QFile file(path);
if (!file.open(QFile::ReadOnly | QFile::Text)) { if (!file.open(QFile::ReadOnly | QFile::Text)) {
return QByteArray(); return {};
} }
QByteArray data = file.readAll(); QByteArray data = file.readAll();
@ -37,7 +38,7 @@ QByteArray fileOpenQRC(const QString &path) {
QFile file(path); QFile file(path);
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
qDebug() << "error: " << file.errorString(); qDebug() << "error: " << file.errorString();
return QByteArray(); return {};
} }
QByteArray data = file.readAll(); QByteArray data = file.readAll();

View file

@ -6,7 +6,6 @@
#include <QRegularExpression> #include <QRegularExpression>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QApplication>
#include <QTextCharFormat> #include <QTextCharFormat>
#include "libwalletqt/Wallet.h" #include "libwalletqt/Wallet.h"

View file

@ -6,9 +6,7 @@
#include <QTimer> #include <QTimer>
#include <QRegularExpression> #include <QRegularExpression>
#include <QApplication> #include <QHostAddress>
#include <QtNetwork>
#include <QNetworkReply>
#include "model/NodeModel.h" #include "model/NodeModel.h"
#include "utils/Utils.h" #include "utils/Utils.h"

View file

@ -4,9 +4,6 @@
#ifndef TAILSOS_H #ifndef TAILSOS_H
#define TAILSOS_H #define TAILSOS_H
#include <QApplication>
class TailsOS class TailsOS
{ {
public: public:

View file

@ -53,7 +53,6 @@
#include <QKeyEvent> #include <QKeyEvent>
#include <QAbstractItemView> #include <QAbstractItemView>
#include <QtDebug> #include <QtDebug>
#include <QApplication>
#include <QScrollBar> #include <QScrollBar>
#include <QFile> #include <QFile>

View file

@ -8,7 +8,6 @@
#include <QClipboard> #include <QClipboard>
#include <QMimeData> #include <QMimeData>
#include <QScrollBar> #include <QScrollBar>
#include <QtGlobal>
#include "libwalletqt/WalletManager.h" #include "libwalletqt/WalletManager.h"
#include "qrcode/QrCodeUtils.h" #include "qrcode/QrCodeUtils.h"