mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 21:12:29 +02:00
Merge #17908: qt: Remove QFont warnings with QT_QPA_PLATFORM=minimal
1122817c19
qt: Remove QFont warnings with QPA=minimal (Hennadii Stepanov) Pull request description: This PR removes massive warnings like: ``` QWARN : ... QFont::setPointSizeF: Point size <= 0 (...), must be greater than 0 ``` from `test_bitcoin-qt` output. On master (e258ce792a
): ``` $ ./src/qt/test/test_bitcoin-qt | grep QFont | wc -l ~BitcoinApplication : Stopping thread ~BitcoinApplication : Stopped thread 57 ``` With this PR: ``` $ ./src/qt/test/test_bitcoin-qt | grep QFont | wc -l ~BitcoinApplication : Stopping thread ~BitcoinApplication : Stopped thread 0 ``` ACKs for top commit: promag: Code review ACK1122817c19
. jonasschnelli: utACK1122817c19
Tree-SHA512: 32fa72a5d3db1d4c73a2a324aa9cad807ee46f23fc5319f7d71202987dc73ea7c90082904489b323a432e1afaebd9976b7dd0374236a16153162aa75fe368723
This commit is contained in:
commit
c2c15ea54e
@ -48,13 +48,14 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QProgressDialog>
|
||||
#include <QScreen>
|
||||
#include <QSettings>
|
||||
#include <QShortcut>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QShortcut>
|
||||
#include <QTextDocument> // for Qt::mightBeRichText
|
||||
#include <QThread>
|
||||
#include <QUrlQuery>
|
||||
@ -910,4 +911,11 @@ void LogQtInfo()
|
||||
}
|
||||
}
|
||||
|
||||
void PopupMenu(QMenu* menu, const QPoint& point, QAction* at_action)
|
||||
{
|
||||
// The qminimal plugin does not provide window system integration.
|
||||
if (QApplication::platformName() == "minimal") return;
|
||||
menu->popup(point, at_action);
|
||||
}
|
||||
|
||||
} // namespace GUIUtil
|
||||
|
@ -28,9 +28,12 @@ namespace interfaces
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractItemView;
|
||||
class QAction;
|
||||
class QDateTime;
|
||||
class QFont;
|
||||
class QLineEdit;
|
||||
class QMenu;
|
||||
class QPoint;
|
||||
class QProgressDialog;
|
||||
class QUrl;
|
||||
class QWidget;
|
||||
@ -273,6 +276,11 @@ namespace GUIUtil
|
||||
* Writes to debug.log short info about the used Qt and the host system.
|
||||
*/
|
||||
void LogQtInfo();
|
||||
|
||||
/**
|
||||
* Call QMenu::popup() only on supported QT_QPA_PLATFORM.
|
||||
*/
|
||||
void PopupMenu(QMenu* menu, const QPoint& point, QAction* at_action = nullptr);
|
||||
} // namespace GUIUtil
|
||||
|
||||
#endif // BITCOIN_QT_GUIUTIL_H
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <wallet/wallet.h>
|
||||
#endif
|
||||
|
||||
#include <QFont>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
@ -494,7 +495,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||
ui->detailWidget->hide();
|
||||
ui->peerHeading->setText(tr("Select a peer to view detailed information."));
|
||||
|
||||
consoleFontSize = settings.value(fontSizeSettingsKey, QFontInfo(QFont()).pointSize()).toInt();
|
||||
consoleFontSize = settings.value(fontSizeSettingsKey, QFont().pointSize()).toInt();
|
||||
clear();
|
||||
|
||||
GUIUtil::handleCloseWindowShortcut(this);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <qt/bitcoinunits.h>
|
||||
#include <qt/csvmodelwriter.h>
|
||||
#include <qt/editaddressdialog.h>
|
||||
#include <qt/guiutil.h>
|
||||
#include <qt/optionsmodel.h>
|
||||
#include <qt/platformstyle.h>
|
||||
#include <qt/transactiondescdialog.h>
|
||||
@ -396,9 +397,8 @@ void TransactionView::contextualMenu(const QPoint &point)
|
||||
abandonAction->setEnabled(model->wallet().transactionCanBeAbandoned(hash));
|
||||
bumpFeeAction->setEnabled(model->wallet().transactionCanBeBumped(hash));
|
||||
|
||||
if(index.isValid())
|
||||
{
|
||||
contextMenu->popup(transactionView->viewport()->mapToGlobal(point));
|
||||
if (index.isValid()) {
|
||||
GUIUtil::PopupMenu(contextMenu, transactionView->viewport()->mapToGlobal(point));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user