summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GFilePicker.cpp
diff options
context:
space:
mode:
authorBrandon Scott <xeons@users.noreply.github.com>2019-10-01 00:18:20 -0500
committerAndreas Kling <awesomekling@gmail.com>2019-10-01 09:17:56 +0200
commit08a1fb8f1a1e762fa4dc0e67d8162582a6ba2823 (patch)
tree227c0384681d699809dc544faf32239966262b30 /Libraries/LibGUI/GFilePicker.cpp
parent3fb88cb76d27831bed18bd910713db9b522b9394 (diff)
downloadserenity-08a1fb8f1a1e762fa4dc0e67d8162582a6ba2823.zip
LibGUI+PaintBrush: Fix to GFilePicker and PaintBrush enhancements.
GFilePicker - Fixed GFilePicker to use new ref-counted construct method to stop crashing on open dialog. - PaintBrush is still crashing on open dialog due to an unrelated issue. PaintBrush - Created 16x16 icon for PaintBrush - Moved Open option into App menu. - Changed help menu to make use of the standardized About dialog.
Diffstat (limited to 'Libraries/LibGUI/GFilePicker.cpp')
-rw-r--r--Libraries/LibGUI/GFilePicker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibGUI/GFilePicker.cpp b/Libraries/LibGUI/GFilePicker.cpp
index efe1f6444a..312612895e 100644
--- a/Libraries/LibGUI/GFilePicker.cpp
+++ b/Libraries/LibGUI/GFilePicker.cpp
@@ -15,10 +15,10 @@
Optional<String> GFilePicker::get_open_filepath()
{
- GFilePicker picker(Mode::Open);
+ auto picker = GFilePicker::construct(Mode::Open);
- if (picker.exec() == GDialog::ExecOK) {
- String file_path = picker.selected_file().string();
+ if (picker->exec() == GDialog::ExecOK) {
+ String file_path = picker->selected_file().string();
if (file_path.is_null())
return {};