Silence Qt/Windows setGeometry Warning
Add the optional Qt::MSWindowsFixedSizeDialogHint parameter to all uses of the QInputDialog::getX static functions to silence a Qt/Windows debug mode warning about QWindowsWindow::setGeometry: Unable to set geometry. Increase the size of the unit calculator to eliminate the same warning. Finally, call adjustSize() on the "Unsaved Changes" dialog to silence the warning.
This commit is contained in:
@@ -179,7 +179,7 @@ void CmdSketcherNewSketch::activated(int iMsg)
|
||||
QString text = QInputDialog::getItem(Gui::getMainWindow(),
|
||||
qApp->translate("Sketcher_NewSketch", "Sketch attachment"),
|
||||
qApp->translate("Sketcher_NewSketch", "Select the method to attach this sketch to selected object"),
|
||||
items, iSugg, false, &ok);
|
||||
items, iSugg, false, &ok, Qt::MSWindowsFixedSizeDialogHint);
|
||||
if (!ok) return;
|
||||
int index = items.indexOf(text);
|
||||
if (index == 0){
|
||||
@@ -541,7 +541,7 @@ void CmdSketcherMapSketch::activated(int iMsg)
|
||||
QString text = QInputDialog::getItem(Gui::getMainWindow(),
|
||||
qApp->translate("Sketcher_MapSketch", "Select sketch"),
|
||||
qApp->translate("Sketcher_MapSketch", "Select a sketch from the list"),
|
||||
items, 0, false, &ok);
|
||||
items, 0, false, &ok, Qt::MSWindowsFixedSizeDialogHint);
|
||||
if (!ok)
|
||||
return;
|
||||
int index = items.indexOf(text);
|
||||
@@ -620,7 +620,8 @@ void CmdSketcherMapSketch::activated(int iMsg)
|
||||
items,
|
||||
bCurIncompatible ? iSugg : iCurr,
|
||||
false,
|
||||
&ok);
|
||||
&ok,
|
||||
Qt::MSWindowsFixedSizeDialogHint);
|
||||
// * collect dialog result
|
||||
if (!ok)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user