]> danny-edel.de - dspdfviewer.git/commitdiff
add numeric_cast to changed signedness
authorDanny Edel <mail@danny-edel.de>
Thu, 20 Oct 2022 13:58:30 +0000 (15:58 +0200)
committerDanny Edel <mail@danny-edel.de>
Thu, 20 Oct 2022 14:03:30 +0000 (16:03 +0200)
pdfviewerwindow.cpp

index 94ead3e0fa1afffdc97ec60cb5b2583c12ba745c..0153d1597c153eeacf42731bfd34df12b5d37146 100644 (file)
@@ -117,7 +117,8 @@ void PDFViewerWindow::reposition()
     this->windowHandle()->setScreen(0);
   this->showFullScreen();
 #else
-  QRect rect = QGuiApplication::screens().at(m_monitor)->geometry();
+  const int screenNum=numeric_cast<int>(m_monitor);
+  QRect rect = QGuiApplication::screens().at(screenNum)->geometry();
   move( rect.topLeft() );
   resize( rect.size() );
   this->showFullScreen();