mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation * Use std::sort, std::less instead of qSort/qLess * Use QFontMetrics::horizontalAdvance instead of ::width * Use qApp->primaryScreen() instead of QDesktopWidget * use lambas instead of QSignalMapper * Use QTreeWidgetItem::setForeground instead of ::setTextColor * Use QDir::setPath instead of operator=(QString) * Use QList::swapItemsAt instead of ::swap * fix error
This commit is contained in:
parent
f54165025e
commit
b6df5a4ac3
17 changed files with 71 additions and 40 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QRadioButton>
|
||||
#include <QScreen>
|
||||
#include <QSlider>
|
||||
#include <QSpinBox>
|
||||
#include <QStackedWidget>
|
||||
|
|
@ -1129,7 +1130,11 @@ void ShortcutSettingsPage::retranslateUi()
|
|||
|
||||
DlgSettings::DlgSettings(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
||||
QRect rec = qApp->primaryScreen()->availableGeometry();
|
||||
#else
|
||||
QRect rec = QApplication::desktop()->availableGeometry();
|
||||
#endif
|
||||
this->setMinimumSize(rec.width() / 2, rec.height() - 100);
|
||||
this->setBaseSize(rec.width(), rec.height());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue