summaryrefslogtreecommitdiffstats
path: root/src/file_chooser_portal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_chooser_portal.cpp')
-rw-r--r--src/file_chooser_portal.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/file_chooser_portal.cpp b/src/file_chooser_portal.cpp
index 4668abd..9b8f6e7 100644
--- a/src/file_chooser_portal.cpp
+++ b/src/file_chooser_portal.cpp
@@ -27,7 +27,6 @@
#include <tdeio/renamedlg.h>
#include <tdefiledialog.h>
#include <kpushbutton.h>
-#include <twin.h>
#include <kdebug.h>
// Portal
@@ -69,7 +68,7 @@ bool TDEFileChooserPortal::OpenFile(const TQT_DBusObjectPath& handle,
if (OPTION_VALID("filters", "a(sa(us))"))
opts.filters = parseFilterList(options["filters"], options["current_filter"]);
- opts.windowId = parseWindowId(parent_window);
+ opts.windowId = parse_window_id(parent_window);
return execFileDialog(opts, handle, response, results, error);
}
@@ -108,7 +107,7 @@ bool TDEFileChooserPortal::SaveFile(const TQT_DBusObjectPath& handle,
if (OPTION_VALID("current_name", "s"))
opts.startName = options["current_name"].value.toString();
- opts.windowId = parseWindowId(parent_window);
+ opts.windowId = parse_window_id(parent_window);
return execFileDialog(opts, handle, response, results, error);
}
@@ -255,21 +254,6 @@ bool TDEFileChooserPortal::execFileDialog(FileDialogOpts options,
return true;
}
-WId TDEFileChooserPortal::parseWindowId(const TQString data)
-{
- if (!data.startsWith("x11:"))
- {
- kdWarning() << "[FileChooser] Window Identifiers are currently only "
- << "supported for X11. Created dialog will be parentless."
- << endl;
- return 0;
- }
-
- bool ok;
- WId wid = data.mid(4).toInt(&ok, 16);
- return ok ? wid : 0;
-}
-
TQString TDEFileChooserPortal::parseFilter(const TQT_DBusData data)
{
TQStringList patternList;