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 auto parentWindow = KJobWidgets::window(job);
121 if (parentWindow) {
122 parentWidget = parentWindow;
123 }
124 }
125
126 return getParentWidget(parentWidget);
127}
128
129QWidget *KIO::WidgetsAskUserActionHandlerPrivate::getParentWidget(QWidget *widget)
130{
131 // This needs to be in qpointer, otherwise copying process
132 // will crash if done in background and dolphin is closed
133 QPointer<QWidget> parentWidget = widget;
134
135 if (!parentWidget) {
136 parentWidget = this->m_parentWidget;
137 }
138
139 if (!parentWidget) {
140 parentWidget = qApp->activeWindow();
141 }
142
143 return parentWidget;
144}
145
146KIO::WidgetsAskUserActionHandler::WidgetsAskUserActionHandler(QObject *parent)
147 : KIO::AskUserActionInterface(parent)
148 , d(new WidgetsAskUserActionHandlerPrivate(this))
149{
150}
151
152KIO::WidgetsAskUserActionHandler::~WidgetsAskUserActionHandler()
153{
154}
155
157 const QString &title,
158 const QUrl &src,
159 const QUrl &dest,
161 KIO::filesize_t sizeSrc,
162 KIO::filesize_t sizeDest,
163 const QDateTime &ctimeSrc,
164 const QDateTime &ctimeDest,
165 const QDateTime &mtimeSrc,
166 const QDateTime &mtimeDest)
167{
168 QMetaObject::invokeMethod(qGuiApp, [=, this] {
169 auto *dlg = new KIO::RenameDialog(d->getParentWidget(job), title, src, dest, options, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest);
170
171 dlg->setAttribute(Qt::WA_DeleteOnClose);
172 dlg->setWindowModality(Qt::WindowModal);
173
174 connect(job, &KJob::finished, dlg, &QDialog::reject);
175 connect(dlg, &QDialog::finished, this, [this, job, dlg](const int exitCode) {
176 KIO::RenameDialog_Result result = static_cast<RenameDialog_Result>(exitCode);
177 const QUrl newUrl = result == Result_AutoRename ? dlg->autoDestUrl() : dlg->newDestUrl();
178 Q_EMIT askUserRenameResult(result, newUrl, job);
179 });
180
181 dlg->show();
182 });
183}
184
186{
187 QMetaObject::invokeMethod(qGuiApp, [=, this] {
188 auto *dlg = new KIO::SkipDialog(d->getParentWidget(job), options, errorText);
189 dlg->setAttribute(Qt::WA_DeleteOnClose);
190 dlg->setWindowModality(Qt::WindowModal);
191
192 connect(job, &KJob::finished, dlg, &QDialog::reject);
193 connect(dlg, &QDialog::finished, this, [this, job](const int exitCode) {
194 Q_EMIT askUserSkipResult(static_cast<KIO::SkipDialog_Result>(exitCode), job);
195 });
196
197 dlg->show();
198 });
199}
200
201struct ProcessAskDeleteResult {
202 QStringList prettyList;
204 KGuiItem acceptButton;
205 QString text;
206 QIcon icon;
207 QString title = i18n("Delete Permanently");
208 bool isSingleUrl = false;
209};
210
212static ProcessAskDeleteResult processAskDelete(const QList<QUrl> &urls, AskIface::DeletionType deletionType)
213{
214 ProcessAskDeleteResult res;
215 res.prettyList.reserve(urls.size());
216 std::transform(urls.cbegin(), urls.cend(), std::back_inserter(res.prettyList), [](const auto &url) {
217 if (url.scheme() == QLatin1String("trash")) {
218 QString path = url.path();
219 // HACK (#98983): remove "0-foo". Note that it works better than
220 // displaying KFileItem::name(), for files under a subdir.
221 static const QRegularExpression re(QStringLiteral("^/[0-9]+-"));
222 path.remove(re);
223 return path;
224 } else {
225 return url.toDisplayString(QUrl::PreferLocalFile);
226 }
227 });
228
229 const int urlCount = res.prettyList.size();
230 res.isSingleUrl = urlCount == 1;
231
232 switch (deletionType) {
233 case AskIface::Delete: {
234 res.dialogType = KMessageDialog::QuestionTwoActions; // Using Question* so the Delete button is pre-selected. Bug 462845
235 res.icon = QIcon::fromTheme(QStringLiteral("dialog-warning"));
236 if (res.isSingleUrl) {
237 res.text = xi18nc("@info",
238 "Do you really want to permanently delete this item?<nl/><nl/>"
239 "<filename>%1</filename><nl/><nl/>"
240 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
241 res.prettyList.at(0));
242 } else {
243 res.text = xi18ncp("@info",
244 "Do you really want to permanently delete this %1 item?<nl/><nl/>"
245 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
246 "Do you really want to permanently delete these %1 items?<nl/><nl/>"
247 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
248 urlCount);
249 }
250 res.acceptButton = KGuiItem(i18nc("@action:button", "Delete Permanently"), QStringLiteral("edit-delete"));
251 break;
252 }
254 res.dialogType = KMessageDialog::WarningTwoActions;
255 if (res.isSingleUrl) {
256 res.text = xi18nc("@info",
257 "Moving this item to Trash failed as it is too large."
258 " Permanently delete it instead?<nl/><nl/>"
259 "<filename>%1</filename><nl/><nl/>"
260 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
261 res.prettyList.at(0));
262 } else {
263 res.text = xi18ncp("@info",
264 "Moving this %1 item to Trash failed as it is too large."
265 " Permanently delete it instead?<nl/>"
266 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
267 "Moving these %1 items to Trash failed as they are too large."
268 " Permanently delete them instead?<nl/><nl/>"
269 "<emphasis strong='true'>This action cannot be undone.</emphasis>",
270 urlCount);
271 }
272 res.acceptButton = KGuiItem(i18nc("@action:button", "Delete Permanently"), QStringLiteral("edit-delete"));
273 break;
274 }
276 res.dialogType = KMessageDialog::QuestionTwoActions; // Using Question* so the Delete button is pre-selected.
277 res.icon = QIcon::fromTheme(QStringLiteral("dialog-warning"));
278 res.text = xi18nc("@info",
279 "Do you want to permanently delete all items from the Trash?<nl/><nl/>"
280 "<emphasis strong='true'>This action cannot be undone.</emphasis>");
281 res.acceptButton = KGuiItem(i18nc("@action:button", "Empty Trash"), QStringLiteral("user-trash"));
282 break;
283 }
284 case AskIface::Trash: {
285 if (res.isSingleUrl) {
286 res.text = xi18nc("@info",
287 "Do you really want to move this item to the Trash?<nl/>"
288 "<filename>%1</filename>",
289 res.prettyList.at(0));
290 } else {
291 res.text =
292 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);
293 }
294 res.title = i18n("Move to Trash");
295 res.acceptButton = KGuiItem(res.title, QStringLiteral("user-trash"));
296 break;
297 }
298 default:
299 break;
300 }
301 return res;
302}
303
305{
306 QString keyName;
307 bool ask = (confirmationType == ForceConfirmation);
308 if (!ask) {
309 // The default value for confirmations is true for delete and false
310 // for trash. If you change this, please also update:
311 // dolphin/src/settings/general/confirmationssettingspage.cpp
312 bool defaultValue = true;
313
314 switch (deletionType) {
315 case DeleteInsteadOfTrash:
316 case Delete:
317 keyName = QStringLiteral("ConfirmDelete");
318 break;
319 case Trash:
320 keyName = QStringLiteral("ConfirmTrash");
321 defaultValue = false;
322 break;
323 case EmptyTrash:
324 keyName = QStringLiteral("ConfirmEmptyTrash");
325 break;
326 }
327
328 KSharedConfigPtr kioConfig = KSharedConfig::openConfig(QStringLiteral("kiorc"), KConfig::NoGlobals);
329 ask = kioConfig->group(QStringLiteral("Confirmations")).readEntry(keyName, defaultValue);
330 }
331
332 if (!ask) {
333 Q_EMIT askUserDeleteResult(true, urls, deletionType, parent);
334 return;
335 }
336
337 QMetaObject::invokeMethod(qGuiApp, [=, this] {
338 const auto &[prettyList, dialogType, acceptButton, text, icon, title, singleUrl] = processAskDelete(urls, deletionType);
339 KMessageDialog *dlg = new KMessageDialog(dialogType, text, parent);
341 dlg->setCaption(title);
342 dlg->setIcon(icon);
343 dlg->setButtons(acceptButton, KStandardGuiItem::cancel());
344 if (!singleUrl) {
345 dlg->setListWidgetItems(prettyList);
346 }
347 dlg->setDontAskAgainText(i18nc("@option:checkbox", "Do not ask again"));
348 // If we get here, !ask must be false
349 dlg->setDontAskAgainChecked(!ask);
350
351 connect(dlg, &QDialog::finished, this, [=, this](const int buttonCode) {
352 const bool isDelete = (buttonCode == KMessageDialog::PrimaryAction);
353
354 Q_EMIT askUserDeleteResult(isDelete, urls, deletionType, parent);
355
356 if (isDelete) {
357 KSharedConfigPtr kioConfig = KSharedConfig::openConfig(QStringLiteral("kiorc"), KConfig::NoGlobals);
358 KConfigGroup cg = kioConfig->group(QStringLiteral("Confirmations"));
359 cg.writeEntry(keyName, !dlg->isDontAskAgainChecked());
360 cg.sync();
361 }
362 });
363
365 dlg->show();
366 });
367}
368
370 const QString &text,
371 const QString &title,
372 const QString &primaryActionText,
373 const QString &secondaryActionText,
374 const QString &primaryActionIconName,
375 const QString &secondaryActionIconName,
376 const QString &dontAskAgainName,
377 const QString &details,
378 QWidget *parent)
379{
380 if (d->gotPersistentUserReply(type,
381 KSharedConfig::openConfig(QStringLiteral("kioslaverc"))->group(QStringLiteral("Notification Messages")),
382 dontAskAgainName)) {
383 return;
384 }
385
386 const KGuiItem primaryActionButton(primaryActionText, primaryActionIconName);
387 const KGuiItem secondaryActionButton(secondaryActionText, secondaryActionIconName);
388
389 // It's "Do not ask again" every where except with Information
390 QString dontAskAgainText = i18nc("@option:check", "Do not ask again");
391
392 KMessageDialog::Type dlgType;
393 bool hasCancelButton = false;
394
395 switch (type) {
398 break;
401 hasCancelButton = true;
402 break;
405 break;
408 hasCancelButton = true;
409 break;
410 case AskUserActionInterface::WarningContinueCancel:
412 hasCancelButton = true;
413 break;
414 case AskUserActionInterface::Information:
416 dontAskAgainText = i18nc("@option:check", "Do not show this message again");
417 break;
418 case AskUserActionInterface::Error:
419 dlgType = KMessageDialog::Error;
420 dontAskAgainText = QString{}; // No dontAskAgain checkbox
421 break;
422 default:
423 qCWarning(KIO_WIDGETS) << "Unknown message dialog type" << type;
424 return;
425 }
426
427 QMetaObject::invokeMethod(qGuiApp, [=, this]() {
428 auto cancelButton = hasCancelButton ? KStandardGuiItem::cancel() : KGuiItem();
429 auto *dialog = new KMessageDialog(dlgType, text, d->getParentWidget(parent));
430
431 dialog->setAttribute(Qt::WA_DeleteOnClose);
432 dialog->setCaption(title);
433 dialog->setIcon(QIcon{});
434 dialog->setButtons(primaryActionButton, secondaryActionButton, cancelButton);
435 dialog->setDetails(details);
436 dialog->setDontAskAgainText(dontAskAgainText);
437 dialog->setDontAskAgainChecked(false);
438 dialog->setOpenExternalLinks(true); // Allow opening external links in the text labels
439
440 connect(dialog, &QDialog::finished, this, [=, this](const int result) {
442 switch (result) {
445 btnCode = KIO::WorkerBase::Continue;
446 } else {
448 }
449 break;
452 break;
454 btnCode = KIO::WorkerBase::Cancel;
455 break;
457 btnCode = KIO::WorkerBase::Ok;
458 break;
459 default:
460 qCWarning(KIO_WIDGETS) << "Unknown message dialog result" << result;
461 return;
462 }
463
464 Q_EMIT messageBoxResult(btnCode);
465
466 if ((result != KMessageDialog::Cancel) && dialog->isDontAskAgainChecked()) {
467 KSharedConfigPtr reqMsgConfig = KSharedConfig::openConfig(QStringLiteral("kioslaverc"));
468 KConfigGroup cg = reqMsgConfig->group(QStringLiteral("Notification Messages"));
469 d->savePersistentUserReply(type, cg, dontAskAgainName, result);
470 }
471 });
472
473 dialog->show();
474 });
475}
476
477void KIO::WidgetsAskUserActionHandler::setWindow(QWidget *window)
478{
479 d->m_parentWidget = window;
480}
481
482void KIO::WidgetsAskUserActionHandler::askIgnoreSslErrors(const QVariantMap &sslErrorData, QWidget *parent)
483{
484 QWidget *parentWidget = d->getParentWidget(parent);
485
486 QString message = i18n("The server failed the authenticity check (%1).\n\n", sslErrorData[QLatin1String("hostname")].toString());
487
488 message += sslErrorData[QLatin1String("sslError")].toString();
489
490 auto *dialog = new KMessageDialog(KMessageDialog::WarningTwoActionsCancel, message, parentWidget);
491
492 dialog->setAttribute(Qt::WA_DeleteOnClose);
493 dialog->setCaption(i18n("Server Authentication"));
494 dialog->setIcon(QIcon{});
495 dialog->setButtons(KGuiItem{i18n("&Details"), QStringLiteral("documentinfo")}, KStandardGuiItem::cont(), KStandardGuiItem::cancel());
496
497 connect(dialog, &KMessageDialog::finished, this, [this, parentWidget, sslErrorData](int result) {
498 if (result == KMessageDialog::PrimaryAction) {
499 showSslDetails(sslErrorData, parentWidget);
500 } else if (result == KMessageDialog::SecondaryAction) {
501 // continue();
502 Q_EMIT askIgnoreSslErrorsResult(1);
503 } else if (result == KMessageDialog::Cancel) {
504 // cancel();
505 Q_EMIT askIgnoreSslErrorsResult(0);
506 }
507 });
508
509 dialog->show();
510}
511
512void KIO::WidgetsAskUserActionHandler::showSslDetails(const QVariantMap &sslErrorData, QWidget *parentWidget)
513{
514 const QStringList sslList = sslErrorData[QLatin1String("peerCertChain")].toStringList();
515
516 QList<QSslCertificate> certChain;
517 bool decodedOk = true;
518 for (const QString &str : sslList) {
519 certChain.append(QSslCertificate(str.toUtf8()));
520 if (certChain.last().isNull()) {
521 decodedOk = false;
522 break;
523 }
524 }
525
526 QMetaObject::invokeMethod(qGuiApp, [=, this] {
527 if (decodedOk) { // Use KSslInfoDialog
528 KSslInfoDialog *ksslDlg = new KSslInfoDialog(parentWidget);
529 ksslDlg->setSslInfo(
530 certChain,
531 QString(),
532 sslErrorData[QLatin1String("hostname")].toString(),
533 sslErrorData[QLatin1String("protocol")].toString(),
534 sslErrorData[QLatin1String("cipher")].toString(),
535 sslErrorData[QLatin1String("usedBits")].toInt(),
536 sslErrorData[QLatin1String("bits")].toInt(),
537 KSslInfoDialog::certificateErrorsFromString(sslErrorData[QLatin1String("certificateErrors")].toStringList().join(QLatin1Char('\n'))));
538
539 // KSslInfoDialog deletes itself by setting Qt::WA_DeleteOnClose
540
541 QObject::connect(ksslDlg, &QDialog::finished, this, [this, sslErrorData, parentWidget]() {
542 // KSslInfoDialog only has one button, QDialogButtonBox::Close
543 askIgnoreSslErrors(sslErrorData, parentWidget);
544 });
545
546 ksslDlg->show();
547 return;
548 }
549
550 // Fallback to a generic message box
551 auto *dialog = new KMessageDialog(KMessageDialog::Information, i18n("The peer SSL certificate chain appears to be corrupt."), parentWidget);
552
553 dialog->setAttribute(Qt::WA_DeleteOnClose);
554 dialog->setCaption(i18n("SSL"));
555 dialog->setButtons(KStandardGuiItem::ok());
556
557 QObject::connect(dialog, &QDialog::finished, this, [this](const int result) {
558 Q_EMIT askIgnoreSslErrorsResult(result == KMessageDialog::Ok ? 1 : 0);
559 });
560
561 dialog->show();
562 });
563}
564
565#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 Fri May 3 2024 11:49:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.