Skip to content

Commit 199eab0

Browse files
authored
Merge pull request doxygen#11806 from artyom-fedosov/fix/compiler-warnings
Fix/compiler warnings
2 parents b2ecb97 + ee31087 commit 199eab0

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

addon/doxywizard/doxywizard.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ MainWindow::MainWindow()
6363
{
6464
QMenu *file = menuBar()->addMenu(tr("File"));
6565
file->addAction(tr("Open..."),
66-
this, SLOT(openConfig()), Qt::CTRL|Qt::Key_O);
66+
this, SLOT(openConfig()), QKeySequence{ Qt::CTRL | Qt::Key_O });
6767
m_recentMenu = file->addMenu(tr("Open recent"));
6868
file->addAction(tr("Save"),
69-
this, SLOT(saveConfig()), Qt::CTRL|Qt::Key_S);
69+
this, SLOT(saveConfig()), QKeySequence{ Qt::CTRL | Qt::Key_S });
7070
file->addAction(tr("Save as..."),
71-
this, SLOT(saveConfigAs()), Qt::SHIFT|Qt::CTRL|Qt::Key_S);
71+
this, SLOT(saveConfigAs()), QKeySequence{ Qt::SHIFT | Qt::CTRL | Qt::Key_S });
7272
file->addAction(tr("Quit"),
73-
this, SLOT(quit()), Qt::CTRL|Qt::Key_Q);
73+
this, SLOT(quit()), QKeySequence{ Qt::CTRL | Qt::Key_Q });
7474

7575
QMenu *settings = menuBar()->addMenu(tr("Settings"));
7676
m_resetDefault = settings->addAction(tr("Reset to factory defaults"),
@@ -81,7 +81,7 @@ MainWindow::MainWindow()
8181
this,SLOT(clearRecent()));
8282
settings->addSeparator();
8383
m_runMenu = settings->addAction(tr("Run doxygen"),
84-
this,SLOT(runDoxygenMenu()),Qt::CTRL|Qt::Key_R);
84+
this, SLOT(runDoxygenMenu()), QKeySequence{ Qt::CTRL | Qt::Key_R });
8585
m_runMenu->setEnabled(false);
8686

8787
QMenu *help = menuBar()->addMenu(tr("Help"));
@@ -706,8 +706,8 @@ void MainWindow::saveLog()
706706
}
707707
else
708708
{
709-
QMessageBox::warning(nullptr,tr("Warning"),
710-
tr("Cannot open file ")+fn+tr(" for writing. Nothing saved!"),tr("ok"));
709+
QMessageBox::warning(nullptr, tr("Warning"),
710+
tr("Cannot open file ") + fn + tr(" for writing. Nothing saved!"), QMessageBox::Ok);
711711
}
712712
}
713713
}
@@ -807,13 +807,15 @@ void MainWindow::outputLogFinish()
807807
//-----------------------------------------------------------------------
808808
int main(int argc,char **argv)
809809
{
810+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
810811
static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO";
811812
if (!qEnvironmentVariableIsSet(ENV_VAR_QT_DEVICE_PIXEL_RATIO)
812-
&& !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
813-
&& !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
814-
&& !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
813+
&& !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
814+
&& !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
815+
&& !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
815816
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
816817
}
818+
#endif
817819

818820
QApplication a(argc,argv);
819821
int locArgc = argc;

addon/doxywizard/wizard.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
533533

534534
//---------------------------------------------------
535535
QFrame *f = new QFrame( this );
536-
f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
536+
f->setFrameShape(QFrame::HLine);
537+
f->setFrameShadow(QFrame::Sunken);
537538
layout->addWidget(f);
538539

539540
l = new QLabel(this);
@@ -559,7 +560,8 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
559560

560561
//---------------------------------------------------
561562
f = new QFrame( this );
562-
f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
563+
f->setFrameShape(QFrame::HLine);
564+
f->setFrameShadow(QFrame::Sunken);
563565
layout->addWidget(f);
564566

565567
l = new QLabel(this);
@@ -778,7 +780,8 @@ Step2::Step2(Wizard *wizard,const QHash<QString,Input*> &modelData)
778780

779781
//---------------------------------------------------
780782
QFrame *f = new QFrame( this );
781-
f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
783+
f->setFrameShape(QFrame::HLine);
784+
f->setFrameShadow(QFrame::Sunken);
782785
layout->addWidget(f);
783786

784787
m_optimizeLangGroup = new QButtonGroup(this);

0 commit comments

Comments
 (0)