Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/accessmanager.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 122 | { | |||
---|---|---|---|---|---|
123 | d->externalContentAllowed = allowed; | 123 | d->externalContentAllowed = allowed; | ||
124 | } | 124 | } | ||
125 | 125 | | |||
126 | bool AccessManager::isExternalContentAllowed() const | 126 | bool AccessManager::isExternalContentAllowed() const | ||
127 | { | 127 | { | ||
128 | return d->externalContentAllowed; | 128 | return d->externalContentAllowed; | ||
129 | } | 129 | } | ||
130 | 130 | | |||
131 | #ifndef KIOWIDGETS_NO_DEPRECATED | | |||
132 | void AccessManager::setCookieJarWindowId(WId id) | 131 | void AccessManager::setCookieJarWindowId(WId id) | ||
133 | { | 132 | { | ||
134 | QWidget *window = QWidget::find(id); | 133 | QWidget *window = QWidget::find(id); | ||
135 | if (!window) { | 134 | if (!window) { | ||
136 | return; | 135 | return; | ||
137 | } | 136 | } | ||
138 | 137 | | |||
139 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | 138 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | ||
140 | if (jar) { | 139 | if (jar) { | ||
141 | jar->setWindowId(id); | 140 | jar->setWindowId(id); | ||
142 | } | 141 | } | ||
143 | 142 | | |||
144 | d->window = window->isWindow() ? window : window->window(); | 143 | d->window = window->isWindow() ? window : window->window(); | ||
145 | } | 144 | } | ||
146 | #endif | | |||
147 | 145 | | |||
148 | void AccessManager::setWindow(QWidget *widget) | 146 | void AccessManager::setWindow(QWidget *widget) | ||
149 | { | 147 | { | ||
150 | if (!widget) { | 148 | if (!widget) { | ||
151 | return; | 149 | return; | ||
152 | } | 150 | } | ||
153 | 151 | | |||
154 | d->window = widget->isWindow() ? widget : widget->window(); | 152 | d->window = widget->isWindow() ? widget : widget->window(); | ||
155 | 153 | | |||
156 | if (!d->window) { | 154 | if (!d->window) { | ||
157 | return; | 155 | return; | ||
158 | } | 156 | } | ||
159 | 157 | | |||
160 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | 158 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | ||
161 | if (jar) { | 159 | if (jar) { | ||
162 | jar->setWindowId(d->window->winId()); | 160 | jar->setWindowId(d->window->winId()); | ||
163 | } | 161 | } | ||
164 | } | 162 | } | ||
165 | 163 | | |||
166 | #ifndef KIOWIDGETS_NO_DEPRECATED | | |||
167 | WId AccessManager::cookieJarWindowid() const | 164 | WId AccessManager::cookieJarWindowid() const | ||
168 | { | 165 | { | ||
169 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | 166 | KIO::Integration::CookieJar *jar = qobject_cast<KIO::Integration::CookieJar *> (cookieJar()); | ||
170 | if (jar) { | 167 | if (jar) { | ||
171 | return jar->windowId(); | 168 | return jar->windowId(); | ||
172 | } | 169 | } | ||
173 | 170 | | |||
174 | return 0; | 171 | return 0; | ||
175 | } | 172 | } | ||
176 | #endif | | |||
177 | 173 | | |||
178 | QWidget *AccessManager::window() const | 174 | QWidget *AccessManager::window() const | ||
179 | { | 175 | { | ||
180 | return d->window; | 176 | return d->window; | ||
181 | } | 177 | } | ||
182 | 178 | | |||
183 | KIO::MetaData &AccessManager::requestMetaData() | 179 | KIO::MetaData &AccessManager::requestMetaData() | ||
184 | { | 180 | { | ||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |