Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/http/kcookiejar/kcookiewin.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 60 | KCookieWin::KCookieWin(QWidget *parent, KHttpCookieList cookieList, | |||
---|---|---|---|---|---|
62 | : QDialog(parent) | 62 | : QDialog(parent) | ||
63 | { | 63 | { | ||
64 | setModal(true); | 64 | setModal(true); | ||
65 | setObjectName(QStringLiteral("cookiealert")); | 65 | setObjectName(QStringLiteral("cookiealert")); | ||
66 | setWindowTitle(i18n("Cookie Alert")); | 66 | setWindowTitle(i18n("Cookie Alert")); | ||
67 | setWindowIcon(QIcon::fromTheme(QStringLiteral("preferences-web-browser-cookies"))); | 67 | setWindowIcon(QIcon::fromTheme(QStringLiteral("preferences-web-browser-cookies"))); | ||
68 | // all cookies in the list should have the same window at this time, so let's take the first | 68 | // all cookies in the list should have the same window at this time, so let's take the first | ||
69 | if (!cookieList.first().windowIds().isEmpty()) { | 69 | if (!cookieList.first().windowIds().isEmpty()) { | ||
70 | KWindowSystem::setMainWindow(this, cookieList.first().windowIds().first()); | 70 | setAttribute(Qt::WA_NativeWindow, true); | ||
71 | KWindowSystem::setMainWindow(windowHandle(), cookieList.first().windowIds().first()); | ||||
71 | } else { | 72 | } else { | ||
72 | // No window associated... make sure the user notices our dialog. | 73 | // No window associated... make sure the user notices our dialog. | ||
73 | KWindowSystem::setState(winId(), NET::KeepAbove); | 74 | KWindowSystem::setState(winId(), NET::KeepAbove); | ||
74 | KUserTimestamp::updateUserTimestamp(); | 75 | KUserTimestamp::updateUserTimestamp(); | ||
75 | } | 76 | } | ||
76 | 77 | | |||
77 | const int count = cookieList.count(); | 78 | const int count = cookieList.count(); | ||
78 | const KHttpCookie &cookie = cookieList.first(); | 79 | const KHttpCookie &cookie = cookieList.first(); | ||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |