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:
@@ -488,7 +488,7 @@ void DlgCustomToolbars::on_newButton_clicked()
|
||||
{
|
||||
bool ok;
|
||||
QString text = QString::fromLatin1("Custom%1").arg(ui->toolbarTreeWidget->topLevelItemCount()+1);
|
||||
text = QInputDialog::getText(this, tr("New toolbar"), tr("Toolbar name:"), QLineEdit::Normal, text, &ok);
|
||||
text = QInputDialog::getText(this, tr("New toolbar"), tr("Toolbar name:"), QLineEdit::Normal, text, &ok, Qt::MSWindowsFixedSizeDialogHint);
|
||||
if (ok) {
|
||||
// Check for duplicated name
|
||||
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
|
||||
@@ -535,7 +535,7 @@ void DlgCustomToolbars::on_renameButton_clicked()
|
||||
bool ok;
|
||||
QString old_text = item->text(0);
|
||||
QString text = QInputDialog::getText(this, tr("Rename toolbar"), tr("Toolbar name:"),
|
||||
QLineEdit::Normal, old_text, &ok);
|
||||
QLineEdit::Normal, old_text, &ok, Qt::MSWindowsFixedSizeDialogHint);
|
||||
if (ok && text != old_text) {
|
||||
// Check for duplicated name
|
||||
for (int i=0; i<ui->toolbarTreeWidget->topLevelItemCount(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user