27 |
#include <QTextStream> |
#include <QTextStream> |
28 |
#include <QComboBox> |
#include <QComboBox> |
29 |
|
|
30 |
|
#include <QApplication> |
31 |
|
#include <QDesktopWidget> |
32 |
|
|
33 |
#include <lscp/client.h> |
#include <lscp/client.h> |
34 |
|
|
35 |
#ifdef CONFIG_LIBGIG |
#ifdef CONFIG_LIBGIG |
380 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
381 |
const QByteArray& geometry |
const QByteArray& geometry |
382 |
= m_settings.value("/geometry").toByteArray(); |
= m_settings.value("/geometry").toByteArray(); |
383 |
if (!geometry.isEmpty()) |
if (geometry.isEmpty()) { |
384 |
|
QWidget *pParent = pWidget->parentWidget(); |
385 |
|
if (pParent) |
386 |
|
pParent = pParent->window(); |
387 |
|
if (pParent == nullptr) |
388 |
|
pParent = QApplication::desktop(); |
389 |
|
if (pParent) { |
390 |
|
QRect wrect(pWidget->geometry()); |
391 |
|
wrect.moveCenter(pParent->geometry().center()); |
392 |
|
pWidget->move(wrect.topLeft()); |
393 |
|
} |
394 |
|
} else { |
395 |
pWidget->restoreGeometry(geometry); |
pWidget->restoreGeometry(geometry); |
396 |
|
} |
397 |
#else//--LOAD_OLD_GEOMETRY |
#else//--LOAD_OLD_GEOMETRY |
398 |
QPoint wpos; |
QPoint wpos; |
399 |
QSize wsize; |
QSize wsize; |