Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0c96a5b6
Commit
0c96a5b6
authored
Jan 24, 2009
by
Jean-Philippe Andre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: try to fix #2430 (OpenUrl can crash).
+ Remove this-> + Remove toNativeSeparators
parent
1374daaa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
modules/gui/qt4/dialogs/openurl.cpp
modules/gui/qt4/dialogs/openurl.cpp
+11
-9
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+2
-3
No files found.
modules/gui/qt4/dialogs/openurl.cpp
View file @
0c96a5b6
...
...
@@ -38,6 +38,8 @@
#include <QFile>
#include <QLabel>
#include <assert.h>
OpenUrlDialog
*
OpenUrlDialog
::
instance
=
NULL
;
OpenUrlDialog
*
OpenUrlDialog
::
getInstance
(
QWidget
*
parent
,
...
...
@@ -54,10 +56,10 @@ OpenUrlDialog* OpenUrlDialog::getInstance( QWidget *parent,
OpenUrlDialog
::
OpenUrlDialog
(
QWidget
*
parent
,
intf_thread_t
*
_p_intf
,
bool
bClipboard
)
:
QVLCDialog
(
parent
,
_p_intf
)
bool
_bClipboard
)
:
QVLCDialog
(
parent
,
_p_intf
),
bClipboard
(
_bClipboard
)
{
this
->
bClipboard
=
bClipboard
;
this
->
setWindowTitle
(
qtr
(
"Open URL"
)
);
setWindowTitle
(
qtr
(
"Open URL"
)
);
/* Buttons */
QPushButton
*
but
;
...
...
@@ -78,7 +80,7 @@ OpenUrlDialog::OpenUrlDialog( QWidget *parent,
"to the media you want to play"
),
this
);
this
->
setToolTip
(
qtr
(
"If your clipboard contains a valid URL
\n
"
setToolTip
(
qtr
(
"If your clipboard contains a valid URL
\n
"
"or the path to a file on your computer,
\n
"
"it will be automatically selected."
)
);
...
...
@@ -136,11 +138,11 @@ void OpenUrlDialog::showEvent( QShowEvent *ev )
if
(
bClipboard
)
{
QClipboard
*
clipboard
=
QApplication
::
clipboard
();
const
QMimeData
*
data
=
clipboard
->
mimeData
(
QClipboard
::
Selection
);
QString
txt
=
data
->
text
(
).
trimmed
();
assert
(
clipboard
!=
NULL
);
QString
txt
=
clipboard
->
text
(
QClipboard
::
Selection
).
trimmed
();
if
(
txt
.
isEmpty
()
||
(
!
txt
.
contains
(
"://"
)
&&
!
QFile
::
exists
(
txt
)
)
)
txt
=
clipboard
->
mimeData
()
->
text
(
).
trimmed
();
txt
=
clipboard
->
text
(
QClipboard
::
Clipboard
).
trimmed
();
if
(
txt
.
contains
(
"://"
)
||
QFile
::
exists
(
txt
)
)
edit
->
setText
(
txt
);
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
0c96a5b6
...
...
@@ -438,13 +438,12 @@ void DialogsProvider::openUrlDialog()
QString
url
=
oud
->
url
();
if
(
!
url
.
isEmpty
()
)
{
playlist_Add
(
THEPL
,
qtu
(
toNativeSeparators
(
url
)
),
playlist_Add
(
THEPL
,
qtu
(
url
),
NULL
,
!
oud
->
shouldEnqueue
()
?
(
PLAYLIST_APPEND
|
PLAYLIST_GO
)
:
(
PLAYLIST_APPEND
|
PLAYLIST_PREPARSE
),
PLAYLIST_END
,
true
,
false
);
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
toNativeSeparators
(
url
)
);
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
url
);
}
}
}
...
...
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