make sure to show log when needed
This commit is contained in:
parent
59b80f784b
commit
81f4b1102b
@ -26,12 +26,8 @@ void GuiUtilities::setLabelAsNotice(QLabel& label, bool is_warning, bool set_mar
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GuiUtilities::applyDialogProperties(QWidget& widget, const QIcon& icon, const QString& title) {
|
void GuiUtilities::applyDialogProperties(QWidget& widget, const QIcon& icon, const QString& title) {
|
||||||
|
widget.setWindowFlags(Qt::WindowType::Dialog | Qt::WindowType::WindowTitleHint |
|
||||||
widget.setWindowFlags(
|
Qt::WindowType::WindowMaximizeButtonHint | Qt::WindowType::WindowCloseButtonHint);
|
||||||
Qt::WindowType::Dialog |
|
|
||||||
Qt::WindowType::WindowTitleHint |
|
|
||||||
Qt::WindowType::WindowMaximizeButtonHint |
|
|
||||||
Qt::WindowType::WindowCloseButtonHint);
|
|
||||||
|
|
||||||
widget.setWindowIcon(icon);
|
widget.setWindowIcon(icon);
|
||||||
|
|
||||||
@ -46,7 +42,7 @@ void GuiUtilities::restoreState(QWidget* wdg, QByteArray state) {
|
|||||||
|
|
||||||
str >> props;
|
str >> props;
|
||||||
|
|
||||||
QList<QObject*> to_process = { wdg };
|
QList<QObject*> to_process = {wdg};
|
||||||
|
|
||||||
while (!to_process.isEmpty()) {
|
while (!to_process.isEmpty()) {
|
||||||
QObject* act = to_process.takeFirst();
|
QObject* act = to_process.takeFirst();
|
||||||
@ -65,12 +61,10 @@ void GuiUtilities::restoreState(QWidget* wdg, QByteArray state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QByteArray GuiUtilities::saveState(QWidget* wdg) {
|
QByteArray GuiUtilities::saveState(QWidget* wdg) {
|
||||||
QHash<QString, QStringList> props_to_serialize {
|
QHash<QString, QStringList> props_to_serialize{{QSL("QCheckBox"), {QSL("checked")}},
|
||||||
{ QSL("QCheckBox"), { QSL("checked") } },
|
{QSL("QSpinBox"), {QSL("value")}}};
|
||||||
{ QSL("QSpinBox"), { QSL("value") } }
|
|
||||||
};
|
|
||||||
QHash<QString, QHash<QString, QVariant>> props;
|
QHash<QString, QHash<QString, QVariant>> props;
|
||||||
QList<QObject*> to_process = { wdg };
|
QList<QObject*> to_process = {wdg};
|
||||||
|
|
||||||
while (!to_process.isEmpty()) {
|
while (!to_process.isEmpty()) {
|
||||||
QObject* act = to_process.takeFirst();
|
QObject* act = to_process.takeFirst();
|
||||||
|
@ -1141,6 +1141,7 @@ void Application::displayLog() {
|
|||||||
Qt::ConnectionType::QueuedConnection);
|
Qt::ConnectionType::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_logForm->close();
|
||||||
m_logForm->show();
|
m_logForm->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user