Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4a7e027c
Commit
4a7e027c
authored
May 18, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: factorize directory opening
parent
7f2ce08c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
22 deletions
+6
-22
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+6
-22
No files found.
modules/gui/qt4/dialogs_provider.cpp
View file @
4a7e027c
...
...
@@ -491,27 +491,9 @@ void DialogsProvider::openUrlDialog()
**/
static
void
openDirectory
(
intf_thread_t
*
p_intf
,
bool
pl
,
bool
go
)
{
QString
dir
=
QFileDialog
::
getExistingDirectory
(
NULL
,
qtr
(
I_OP_DIR_WINTITLE
),
p_intf
->
p_sys
->
filepath
);
if
(
dir
.
isEmpty
()
)
return
;
p_intf
->
p_sys
->
filepath
=
dir
;
const
char
*
scheme
=
"directory"
;
if
(
dir
.
endsWith
(
DIR_SEP
"VIDEO_TS"
,
Qt
::
CaseInsensitive
)
)
scheme
=
"dvd"
;
else
if
(
dir
.
endsWith
(
DIR_SEP
"BDMV"
,
Qt
::
CaseInsensitive
)
)
{
scheme
=
"bluray"
;
dir
.
remove
(
"BDMV"
);
}
char
*
uri
=
vlc_path2uri
(
qtu
(
toNativeSeparators
(
dir
)
),
scheme
);
if
(
unlikely
(
uri
==
NULL
)
)
return
;
Open
::
openMRL
(
p_intf
,
uri
,
go
,
pl
);
QString
uri
=
DialogsProvider
::
getDirectoryDialog
(
p_intf
);
if
(
!
uri
.
isEmpty
()
)
Open
::
openMRL
(
p_intf
,
uri
,
go
,
pl
);
}
QString
DialogsProvider
::
getDirectoryDialog
(
intf_thread_t
*
p_intf
)
...
...
@@ -533,7 +515,9 @@ QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf )
}
char
*
uri
=
vlc_path2uri
(
qtu
(
toNativeSeparators
(
dir
)
),
scheme
);
if
(
unlikely
(
uri
==
NULL
)
)
return
QString
();
if
(
unlikely
(
uri
==
NULL
)
)
return
QString
();
dir
=
qfu
(
uri
);
free
(
uri
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment