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:
Chris Hennes
2020-12-10 13:00:55 -06:00
committed by wwmayer
parent 1c7c25392d
commit 533814dd0f
14 changed files with 41 additions and 36 deletions

View File

@@ -351,7 +351,7 @@ void DlgMacroExecuteImp::on_createButton_clicked()
{
// query file name
QString fn = QInputDialog::getText(this, tr("Macro file"), tr("Enter a file name, please:"),
QLineEdit::Normal, QString(), 0);
QLineEdit::Normal, QString(), nullptr, Qt::MSWindowsFixedSizeDialogHint);
if (!fn.isEmpty())
{
QString suffix = QFileInfo(fn).suffix().toLower();
@@ -680,7 +680,7 @@ void DlgMacroExecuteImp::on_renameButton_clicked()
// query new name
QString fn = QInputDialog::getText(this, tr("Renaming Macro File"),
tr("Enter new name:"), QLineEdit::Normal, oldName, 0);
tr("Enter new name:"), QLineEdit::Normal, oldName, nullptr, Qt::MSWindowsFixedSizeDialogHint);
if (!fn.isEmpty() && fn != oldName) {
QString suffix = QFileInfo(fn).suffix().toLower();
if (suffix != QLatin1String("fcmacro") && suffix != QLatin1String("py"))
@@ -767,7 +767,8 @@ void DlgMacroExecuteImp::on_duplicateButton_clicked()
// give user a chance to pick a different name from digitized name suggested
QString fn = QInputDialog::getText(this, tr("Duplicate Macro"),
tr("Enter new name:"), QLineEdit::Normal, oldNameDigitized, 0);
tr("Enter new name:"), QLineEdit::Normal, oldNameDigitized,
nullptr, Qt::MSWindowsFixedSizeDialogHint);
if (!fn.isEmpty() && fn != oldName) {
QString suffix = QFileInfo(fn).suffix().toLower();
if (suffix != QLatin1String("fcmacro") && suffix != QLatin1String("py")){