This commit is contained in:
Thijs Wenker 2018-08-28 19:43:59 +02:00
parent c05fe7f0b7
commit c4d43b3fbc
2 changed files with 2 additions and 2 deletions
interface/resources/qml
libraries/ui/src

View file

@ -147,7 +147,7 @@ Windows.Window {
Qt.WindowMaximizeButtonHint |
Qt.WindowMinimizeButtonHint;
// only use the always on top feature for non Windows OS
if (Qt.platform.os !== "windows" && (flags & Desktop.ALWAYS_ON_TOP) === Desktop.ALWAYS_ON_TOP) {
if (Qt.platform.os !== "windows" && (flags & Desktop.ALWAYS_ON_TOP)) {
nativeWindowFlags |= Qt.WindowStaysOnTopHint;
}
nativeWindow.flags = nativeWindowFlags;

View file

@ -43,7 +43,7 @@ MainWindow::~MainWindow() {
QWindow* MainWindow::findMainWindow() {
auto windows = qApp->topLevelWindows();
QWindow* result = nullptr;
for (auto window : windows) {
for (const auto& window : windows) {
if (window->objectName().contains("MainWindow")) {
result = window;
break;