KIO

widgetsaskuseractionhandler.cpp
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2020 Ahmad Samir <a.samirh78@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "widgetsaskuseractionhandler.h"
9
10#include <KConfig>
11#include <KConfigGroup>
12#include <KGuiItem>
13#include <KIO/WorkerBase>
14#include <KJob>
15#include <KJobWidgets>
16#include <KLocalizedString>
17#include <KMessageDialog>
18#include <KSharedConfig>
19#include <KSslInfoDialog>
20#include <KStandardGuiItem>
21#include <kio_widgets_debug.h>
22
23#include <QApplication>
24#include <QDialogButtonBox>
25#include <QPointer>
26#include <QRegularExpression>
27#include <QUrl>
28
29class KIO::WidgetsAskUserActionHandlerPrivate
30{
31public:
32 explicit WidgetsAskUserActionHandlerPrivate(WidgetsAskUserActionHandler *qq)
33 : q(qq)
34 {
35 }
36
37 // Creates a KSslInfoDialog or falls back to a generic Information dialog
38 void sslMessageBox(const QString &text, const KIO::MetaData &metaData, QWidget *parent);
39
40 bool gotPersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type, const KConfigGroup &cg, const QString &dontAskAgainName);
41 void savePersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type, KConfigGroup &cg, const QString &dontAskAgainName, int result);
42
43 WidgetsAskUserActionHandler *const q;
44 QPointer<QWidget> m_parentWidget = nullptr;
45
46 QWidget *getParentWidget(KJob *job);
47 QWidget *getParentWidget(QWidget *widget);
48};
49
50bool KIO::WidgetsAskUserActionHandlerPrivate::gotPersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type,
51 const KConfigGroup &cg,
52 const QString &dontAskAgainName)
53{
54 // storage values matching the logic of FrameworkIntegration's KMessageBoxDontAskAgainConfigStorage
55 switch (type) {
60 // storage holds "true" if persistent reply is "Yes", "false" for persistent "No",
61 // otherwise no persistent reply is present
62 const QString value = cg.readEntry(dontAskAgainName, QString());
63 if ((value.compare(QLatin1String("yes"), Qt::CaseInsensitive) == 0) || (value.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0)) {
65 return true;
66 }
67 if ((value.compare(QLatin1String("no"), Qt::CaseInsensitive) == 0) || (value.compare(QLatin1String("false"), Qt::CaseInsensitive) == 0)) {
69 return true;
70 }
71 break;
72 }
73 case KIO::AskUserActionInterface::WarningContinueCancel: {
74 // storage holds "false" if persistent reply is "Continue"
75 // otherwise no persistent reply is present
76 const bool value = cg.readEntry(dontAskAgainName, true);
77 if (value == false) {
78 Q_EMIT q->messageBoxResult(KIO::WorkerBase::Continue);
79 return true;
80 }
81 break;
82 }
83 default:
84 break;
85 }
86
87 return false;
88}
89
90void KIO::WidgetsAskUserActionHandlerPrivate::savePersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type,
91 KConfigGroup &cg,
92 const QString &dontAskAgainName,
93 int result)
94{
95 // see gotPersistentUserReply for values stored and why
96 switch (type) {
101 cg.writeEntry(dontAskAgainName, result == KIO::WorkerBase::PrimaryAction);
102 cg.sync();
103 break;
104 case KIO::AskUserActionInterface::WarningContinueCancel:
105 cg.writeEntry(dontAskAgainName, false);
106 cg.sync();
107 break;
108 default:
109 break;
110 }
111}
112
113QWidget *KIO::WidgetsAskUserActionHandlerPrivate::getParentWidget(KJob *job)
114{
115 // This needs to be in qpointer, otherwise copying process
116 // will crash if done in background and dolphin is closed
117 QPointer<QWidget> parentWidget = nullptr;
118
119 if (job) {
120 parentWidget = KJobWidgets::window(job);
121 }
122
123 return getParentWidget(parentWidget);
124}
125
126QWidget *KIO::WidgetsAskUserActionHandlerPrivate::getParentWidget(QWidget *widget)
127{
128 // This needs to be in qpointer, otherwise copying process
129 // will crash if done in background and dolphin is closed
130 QPointer<QWidget> parentWidget = widget;
131
132 if (!parentWidget) {
133 parentWidget = this->m_parentWidget;
134 }
135
136 if (!parentWidget) {
137 parentWidget = qApp->activeWindow();
138 }
139
140 return parentWidget;
141}
142
143KIO::WidgetsAskUserActionHandler::WidgetsAskUserActionHandler(QObject *parent)
144 : KIO::AskUserActionInterface(parent)
145 , d(new WidgetsAskUserActionHandlerPrivate(this))
146{
147}
148
149KIO::WidgetsAskUserActionHandler::~WidgetsAskUserActionHandler()
150{
151}
152
154 const QString &title,
155 const QUrl &src,
156 const QUrl &dest,
158 KIO::filesize_t sizeSrc,
159 KIO::filesize_t sizeDest,
160 const QDateTime &ctimeSrc,
161 const QDateTime &ctimeDest,
162 const QDateTime &mtimeSrc,
163 const QDateTime &mtimeDest)
164{
165 QMetaObject::invokeMethod(qGuiApp, [=, this] {
166 auto *dlg = new KIO::RenameDialog(d->getParentWidget(job), title, src, dest, options, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest);
167
168 dlg->setAttribute(Qt::WA_DeleteOnClose);
169 dlg->setWindowModality(Qt::WindowModal);
170
171 connect(job, &KJob::finished, dlg, &QDialog::reject);
172 connect(dlg, &QDialog::finished, this, [this, job, dlg](const int exitCode) {
173 KIO::RenameDialog_Result result = static_cast<RenameDialog_Result>(exitCode);
174 const QUrl newUrl = result == Result_AutoRename ? dlg->autoDestUrl() : dlg->newDestUrl();
175 Q_EMIT askUserRenameResult(result, newUrl, job);
176 });
177
178 dlg->show();
179 });
180}
181
183{
184 QMetaObject::invokeMethod(qGuiApp, [=, this] {
185 auto *dlg = new KIO::SkipDialog(d->getParentWidget(job), options, errorText);
186 dlg->setAttribute(Qt::WA_DeleteOnClose);
187 dlg->setWindowModality(Qt::WindowModal);
188
189 connect(job, &KJob::finished, dlg, &QDialog::reject);
190 connect(dlg, &QDialog::finished, this, [this, job](const int exitCode) {
191 Q_EMIT askUserSkipResult(static_cast<KIO::SkipDialog_Result>(exitCode), job);
192 });
193
194 dlg->show();
195 });
196}
197
198struct ProcessAskDeleteResult {
199 QStringList prettyList;
201 KGuiItem acceptButton;
202 QString text;
203 QIcon icon;
204 QString title = i18n("Delete Permanently");
205 bool isSingleUrl = false;
206};
207
209static ProcessAskDeleteResult processAskDelete(const QList<QUrl> &urls, AskIface::DeletionType deletionType)
210{
211 ProcessAskDeleteResult res;
212 res.prettyList.reserve(urls.size());
213 std::transform(urls.cbegin(), urls.cend(), std::back_inserter(res.prettyList), [](const auto &url) {
214 if (url.scheme() == QLatin1String("trash")) {
215 QString path = url.path();
216 // HACK (#98983): remove "0-foo". Note that it works better than
217 // displaying KFileItem::name(), for files under a subdir.
218 static const QRegularExpression re(QStringLiteral("^/[0-9]+-"));
219 path.remove(re);
220 return path;
221 } else {
222 return url.toDisplayString(QUrl::PreferLocalFile);
223 }
224 });
225
226 const int urlCount = res.prettyList.size();
227 res.isSingleUrl = urlCount == 1;
228
229 switch (deletionType) {
230 case AskIface::Delete: {
231 res.dialogType = KMessageDialog::QuestionTwoActions; // Using Question* so the Delete button is pre-selected. Bug 462845
232 res.icon = QIcon::fromTheme(QStringLiteral("dialog-warning"));
233 if (res.isSingleUrl) {
234 res.text = xi18nc("@info",
235 "Do you really want to permanently delete this item?<nl/><nl/>"
236 "<filename>%1</filename><nl/><nl/>"
237 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
238 res.prettyList.at(0));
239 } else {
240 res.text = xi18ncp("@info",
241 "Do you really want to permanently delete this %1 item?<nl/><nl/>"
242 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
243 "Do you really want to permanently delete these %1 items?<nl/><nl/>"
244 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
245 urlCount);
246 }
247 res.acceptButton = KGuiItem(i18nc("@action:button", "Delete Permanently"), QStringLiteral("edit-delete"));
248 break;
249 }
251 res.dialogType = KMessageDialog::WarningTwoActions;
252 if (res.isSingleUrl) {
253 res.text = xi18nc("@info",
254 "Moving this item to Trash failed as it is too large."
255 " Permanently delete it instead?<nl/><nl/>"
256 "<filename>%1</filename><nl/><nl/>"
257 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
258 res.prettyList.at(0));
259 } else {
260 res.text = xi18ncp("@info",
261 "Moving this %1 item to Trash failed as it is too large."
262 " Permanently delete it instead?<nl/>"
263 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
264 "Moving these %1 items to Trash failed as they are too large."
265 " Permanently delete them instead?<nl/><nl/>"
266 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
267 urlCount);
268 }
269 res.acceptButton = KGuiItem(i18nc("@action:button", "Delete Permanently"), QStringLiteral("edit-delete"));
270 break;
271 }
273 res.dialogType = KMessageDialog::QuestionTwoActions; // Using Question* so the Delete button is pre-selected.
274 res.icon = QIcon::fromTheme(QStringLiteral("dialog-warning"));
275 res.text = xi18nc("@info",
276 "Do you want to permanently delete all items from the Trash?<nl/><nl/>"
277 "<emphasis strong='true'>This action cannot be undone.</emphasis>");
278 res.acceptButton = KGuiItem(i18nc("@action:button", "Empty Trash"), QStringLiteral("user-trash"));
279 break;
280 }
281 case AskIface::Trash: {
282 if (res.isSingleUrl) {
283 res.text = xi18nc("@info",
284 "Do you really want to move this item to the Trash?<nl/>"
285 "<filename>%1</filename>",
286 res.prettyList.at(0));
287 } else {
288 res.text =
289 xi18ncp("@info", "Do you really want to move this %1 item to the Trash?", "Do you really want to move these %1 items to the Trash?", urlCount);
290 }
291 res.title = i18n("Move to Trash");
292 res.acceptButton = KGuiItem(res.title, QStringLiteral("user-trash"));
293 break;
294 }
295 default:
296 break;
297 }
298 return res;
299}
300
302{
303 QString keyName;
304 bool ask = (confirmationType == ForceConfirmation);
305 if (!ask) {
306 // The default value for confirmations is true for delete and false
307 // for trash. If you change this, please also update:
308 // dolphin/src/settings/general/confirmationssettingspage.cpp
309 bool defaultValue = true;
310
311 switch (deletionType) {
312 case DeleteInsteadOfTrash:
313 case Delete:
314 keyName = QStringLiteral("ConfirmDelete");
315 break;
316 case Trash:
317 keyName = QStringLiteral("ConfirmTrash");
318 defaultValue = false;
319 break;
320 case EmptyTrash:
321 keyName = QStringLiteral("ConfirmEmptyTrash");
322 break;
323 }
324
325 KSharedConfigPtr kioConfig = KSharedConfig::openConfig(QStringLiteral("kiorc"), KConfig::NoGlobals);
326 ask = kioConfig->group(QStringLiteral("Confirmations")).readEntry(keyName, defaultValue);
327 }
328
329 if (!ask) {
330 Q_EMIT askUserDeleteResult(true, urls, deletionType, parent);
331 return;
332 }
333
334 QMetaObject::invokeMethod(qGuiApp, [=, this] {
335 const auto &[prettyList, dialogType, acceptButton, text, icon, title, singleUrl] = processAskDelete(urls, deletionType);
336 KMessageDialog *dlg = new KMessageDialog(dialogType, text, parent);
338 dlg->setCaption(title);
339 dlg->setIcon(icon);
340 dlg->setButtons(acceptButton, KStandardGuiItem::cancel());
341 if (!singleUrl) {
342 dlg->setListWidgetItems(prettyList);
343 }
344 dlg->setDontAskAgainText(i18nc("@option:checkbox", "Do not ask again"));
345 // If we get here, !ask must be false
346 dlg->setDontAskAgainChecked(!ask);
347
348 connect(dlg, &QDialog::finished, this, [=, this](const int buttonCode) {
349 const bool isDelete = (buttonCode == KMessageDialog::PrimaryAction);
350
351 Q_EMIT askUserDeleteResult(isDelete, urls, deletionType, parent);
352
353 if (isDelete) {
354 KSharedConfigPtr kioConfig = KSharedConfig::openConfig(QStringLiteral("kiorc"), KConfig::NoGlobals);
355 KConfigGroup cg = kioConfig->group(QStringLiteral("Confirmations"));
356 cg.writeEntry(keyName, !dlg->isDontAskAgainChecked());
357 cg.sync();
358 }
359 });
360
362 dlg->show();
363 });
364}
365
367 const QString &text,
368 const QString &title,
369 const QString &primaryActionText,
370 const QString &secondaryActionText,
371 const QString &primaryActionIconName,
372 const QString &secondaryActionIconName,
373 const QString &dontAskAgainName,
374 const QString &details,
375 QWidget *parent)
376{
377 if (d->gotPersistentUserReply(type,
378 KSharedConfig::openConfig(QStringLiteral("kioslaverc"))->group(QStringLiteral("Notification Messages")),
379 dontAskAgainName)) {
380 return;
381 }
382
383 const KGuiItem primaryActionButton(primaryActionText, primaryActionIconName);
384 const KGuiItem secondaryActionButton(secondaryActionText, secondaryActionIconName);
385
386 // It's "Do not ask again" every where except with Information
387 QString dontAskAgainText = i18nc("@option:check", "Do not ask again");
388
389 KMessageDialog::Type dlgType;
390 bool hasCancelButton = false;
391
392 switch (type) {
395 break;
398 hasCancelButton = true;
399 break;
402 break;
405 hasCancelButton = true;
406 break;
407 case AskUserActionInterface::WarningContinueCancel:
409 hasCancelButton = true;
410 break;
411 case AskUserActionInterface::Information:
413 dontAskAgainText = i18nc("@option:check", "Do not show this message again");
414 break;
415 case AskUserActionInterface::Error:
416 dlgType = KMessageDialog::Error;
417 dontAskAgainText = QString{}; // No dontAskAgain checkbox
418 break;
419 default:
420 qCWarning(KIO_WIDGETS) << "Unknown message dialog type" << type;
421 return;
422 }
423
424 QMetaObject::invokeMethod(qGuiApp, [=, this]() {
425 auto cancelButton = hasCancelButton ? KStandardGuiItem::cancel() : KGuiItem();
426 auto *dialog = new KMessageDialog(dlgType, text, d->getParentWidget(parent));
427
428 dialog->setAttribute(Qt::WA_DeleteOnClose);
429 dialog->setCaption(title);
430 dialog->setIcon(QIcon{});
431 dialog->setButtons(primaryActionButton, secondaryActionButton, cancelButton);
432 dialog->setDetails(details);
433 dialog->setDontAskAgainText(dontAskAgainText);
434 dialog->setDontAskAgainChecked(false);
435 dialog->setOpenExternalLinks(true); // Allow opening external links in the text labels
436
437 connect(dialog, &QDialog::finished, this, [=, this](const int result) {
439 switch (result) {
442 btnCode = KIO::WorkerBase::Continue;
443 } else {
445 }
446 break;
449 break;
451 btnCode = KIO::WorkerBase::Cancel;
452 break;
454 btnCode = KIO::WorkerBase::Ok;
455 break;
456 default:
457 qCWarning(KIO_WIDGETS) << "Unknown message dialog result" << result;
458 return;
459 }
460
461 Q_EMIT messageBoxResult(btnCode);
462
463 if ((result != KMessageDialog::Cancel) && dialog->isDontAskAgainChecked()) {
464 KSharedConfigPtr reqMsgConfig = KSharedConfig::openConfig(QStringLiteral("kioslaverc"));
465 KConfigGroup cg = reqMsgConfig->group(QStringLiteral("Notification Messages"));
466 d->savePersistentUserReply(type, cg, dontAskAgainName, result);
467 }
468 });
469
470 dialog->show();
471 });
472}
473
474void KIO::WidgetsAskUserActionHandler::setWindow(QWidget *window)
475{
476 d->m_parentWidget = window;
477}
478
479void KIO::WidgetsAskUserActionHandler::askIgnoreSslErrors(const QVariantMap &sslErrorData, QWidget *parent)
480{
481 QWidget *parentWidget = d->getParentWidget(parent);
482
483 QString message = i18n("The server failed the authenticity check (%1).\n\n", sslErrorData[QLatin1String("hostname")].toString());
484
485 message += sslErrorData[QLatin1String("sslError")].toString();
486
487 auto *dialog = new KMessageDialog(KMessageDialog::WarningTwoActionsCancel, message, parentWidget);
488
489 dialog->setAttribute(Qt::WA_DeleteOnClose);
490 dialog->setCaption(i18n("Server Authentication"));
491 dialog->setIcon(QIcon{});
492 dialog->setButtons(KGuiItem{i18n("&Details"), QStringLiteral("documentinfo")}, KStandardGuiItem::cont(), KStandardGuiItem::cancel());
493
494 connect(dialog, &KMessageDialog::finished, this, [this, parentWidget, sslErrorData](int result) {
495 if (result == KMessageDialog::PrimaryAction) {
496 showSslDetails(sslErrorData, parentWidget);
497 } else if (result == KMessageDialog::SecondaryAction) {
498 // continue();
499 Q_EMIT askIgnoreSslErrorsResult(1);
500 } else if (result == KMessageDialog::Cancel) {
501 // cancel();
502 Q_EMIT askIgnoreSslErrorsResult(0);
503 }
504 });
505
506 dialog->show();
507}
508
509void KIO::WidgetsAskUserActionHandler::showSslDetails(const QVariantMap &sslErrorData, QWidget *parentWidget)
510{
511 const QStringList sslList = sslErrorData[QLatin1String("peerCertChain")].toStringList();
512
513 QList<QSslCertificate> certChain;
514 bool decodedOk = true;
515 for (const QString &str : sslList) {
516 certChain.append(QSslCertificate(str.toUtf8()));
517 if (certChain.last().isNull()) {
518 decodedOk = false;
519 break;
520 }
521 }
522
523 QMetaObject::invokeMethod(qGuiApp, [=, this] {
524 if (decodedOk) { // Use KSslInfoDialog
525 KSslInfoDialog *ksslDlg = new KSslInfoDialog(parentWidget);
526 ksslDlg->setSslInfo(
527 certChain,
528 QString(),
529 sslErrorData[QLatin1String("hostname")].toString(),
530 sslErrorData[QLatin1String("protocol")].toString(),
531 sslErrorData[QLatin1String("cipher")].toString(),
532 sslErrorData[QLatin1String("usedBits")].toInt(),
533 sslErrorData[QLatin1String("bits")].toInt(),
534 KSslInfoDialog::certificateErrorsFromString(sslErrorData[QLatin1String("certificateErrors")].toStringList().join(QLatin1Char('\n'))));
535
536 // KSslInfoDialog deletes itself by setting Qt::WA_DeleteOnClose
537
538 QObject::connect(ksslDlg, &QDialog::finished, this, [this, sslErrorData, parentWidget]() {
539 // KSslInfoDialog only has one button, QDialogButtonBox::Close
540 askIgnoreSslErrors(sslErrorData, parentWidget);
541 });
542
543 ksslDlg->show();
544 return;
545 }
546
547 // Fallback to a generic message box
548 auto *dialog = new KMessageDialog(KMessageDialog::Information, i18n("The peer SSL certificate chain appears to be corrupt."), parentWidget);
549
550 dialog->setAttribute(Qt::WA_DeleteOnClose);
551 dialog->setCaption(i18n("SSL"));
552 dialog->setButtons(KStandardGuiItem::ok());
553
554 QObject::connect(dialog, &QDialog::finished, this, [this](const int result) {
555 Q_EMIT askIgnoreSslErrorsResult(result == KMessageDialog::Ok ? 1 : 0);
556 });
557
558 dialog->show();
559 });
560}
561
562#include "moc_widgetsaskuseractionhandler.cpp"
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
bool sync() override
The AskUserActionInterface class allows a KIO::Job to prompt the user for a decision when e....
@ EmptyTrash
Move the files/directories to Trash.
@ Trash
Delete the files/directories directly, i.e. without moving them to Trash.
ConfirmationType
Deletion confirmation type.
void messageBoxResult(int result)
Implementations of this interface must emit this signal when the dialog invoked by requestUserMessage...
MetaData is a simple map of key/value strings.
Definition metadata.h:23
The dialog shown when a CopyJob realizes that a destination file already exists, and wants to offer t...
void askUserSkip(KJob *job, KIO::SkipDialog_Options options, const QString &error_text) override
You need to connect to the askUserSkipResult signal to get the dialog's result.
void askUserDelete(const QList< QUrl > &urls, DeletionType deletionType, ConfirmationType confirmationType, QWidget *parent=nullptr) override
Ask for confirmation before moving urls (files/directories) to the Trash, emptying the Trash,...
void requestUserMessageBox(MessageDialogType type, const QString &text, const QString &title, const QString &primaryActionText, const QString &secondaryActionText, const QString &primaryActionIconName={}, const QString &secondaryActionIconName={}, const QString &dontAskAgainName={}, const QString &details={}, QWidget *parent=nullptr) override
This function allows for the delegation of user prompts from the KIO worker.
void askUserRename(KJob *job, const QString &title, const QUrl &src, const QUrl &dest, KIO::RenameDialog_Options options, KIO::filesize_t sizeSrc=KIO::filesize_t(-1), KIO::filesize_t sizeDest=KIO::filesize_t(-1), const QDateTime &ctimeSrc={}, const QDateTime &ctimeDest={}, const QDateTime &mtimeSrc={}, const QDateTime &mtimeDest={}) override
Constructs a modal, parent-less "rename" dialog, to prompt the user for a decision in case of conflic...
ButtonCode
Button codes.
Definition workerbase.h:232
void finished(KJob *job)
bool isDontAskAgainChecked() const
void setListWidgetItems(const QStringList &strlist)
void setIcon(const QIcon &icon)
void setButtons(const KGuiItem &primaryAction=KGuiItem(), const KGuiItem &secondaryAction=KGuiItem(), const KGuiItem &cancelAction=KGuiItem())
void setDontAskAgainChecked(bool isChecked)
void setDontAskAgainText(const QString &dontAskAgainText)
void setCaption(const QString &caption)
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
KDE SSL Information Dialog.
void setSslInfo(const QList< QSslCertificate > &certificateChain, const QString &ip, const QString &host, const QString &sslProtocol, const QString &cipher, int usedBits, int bits, const QList< QList< QSslError::SslError > > &validationErrors)
Set information to display about the SSL connection.
static QList< QList< QSslError::SslError > > certificateErrorsFromString(const QString &errorsString)
Converts certificate errors as provided in the "ssl_cert_errors" meta data to a list of QSslError::Ss...
QString xi18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...)
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
char * toString(const EngineQuery &query)
bool KIOWIDGETS_EXPORT askIgnoreSslErrors(const KSslErrorUiData &uiData, RulesStorage storedRules=RecallAndStoreRules)
If there are errors while establishing an SSL encrypted connection to a peer, usually due to certific...
Definition sslui.cpp:16
A namespace for KIO globals.
RenameDialog_Result
The result of a rename or skip dialog.
qulonglong filesize_t
64-bit file size
Definition global.h:35
QWidget * window(QObject *job)
KGuiItem cont()
KGuiItem cancel()
void finished(int result)
virtual void reject()
QIcon fromTheme(const QString &name)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
const_iterator cbegin() const const
const_iterator cend() const const
T & last()
void reserve(qsizetype size)
qsizetype size() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
CaseInsensitive
WA_DeleteOnClose
WindowModal
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void show()
void setWindowModality(Qt::WindowModality windowModality)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.