Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
034e5706
Commit
034e5706
authored
Jan 23, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: follow the recommendations about foreach loops.
parent
3396d9f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+1
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+1
-1
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/dialogs/playlist.cpp
+1
-1
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+4
-5
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+1
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
034e5706
...
...
@@ -161,7 +161,7 @@ void FileOpenPanel::browseFileSub()
void
FileOpenPanel
::
updateMRL
()
{
QString
mrl
=
""
;
foreach
(
QString
file
,
dialogBox
->
selectedFiles
()
)
{
foreach
(
const
QString
&
file
,
dialogBox
->
selectedFiles
()
)
{
mrl
+=
"
\"
"
+
file
+
"
\"
"
;
}
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
034e5706
...
...
@@ -133,7 +133,7 @@ QMimeData *PLModel::mimeData( const QModelIndexList &indexes ) const
QByteArray
encodedData
;
QDataStream
stream
(
&
encodedData
,
QIODevice
::
WriteOnly
);
foreach
(
QModelIndex
index
,
indexes
)
{
foreach
(
const
QModelIndex
&
index
,
indexes
)
{
if
(
index
.
isValid
()
&&
index
.
column
()
==
0
)
stream
<<
itemId
(
index
);
}
...
...
modules/gui/qt4/dialogs/playlist.cpp
View file @
034e5706
...
...
@@ -65,7 +65,7 @@ PlaylistDialog::~PlaylistDialog()
void
PlaylistDialog
::
dropEvent
(
QDropEvent
*
event
)
{
const
QMimeData
*
mimeData
=
event
->
mimeData
();
foreach
(
QUrl
url
,
mimeData
->
urls
()
)
{
foreach
(
const
QUrl
&
url
,
mimeData
->
urls
()
)
{
QString
s
=
toNativeSeparators
(
url
.
toString
()
);
if
(
s
.
length
()
>
0
)
{
playlist_Add
(
THEPL
,
qtu
(
s
),
NULL
,
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
034e5706
...
...
@@ -291,7 +291,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
p_arg
->
i_results
=
files
.
count
();
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
i
=
0
;
foreach
(
QString
file
,
files
)
foreach
(
const
QString
&
file
,
files
)
p_arg
->
psz_results
[
i
++
]
=
strdup
(
qtu
(
toNativeSepNoSlash
(
file
)
)
);
}
...
...
@@ -395,7 +395,7 @@ void DialogsProvider::addFromSimple( bool pl, bool go)
{
QStringList
files
=
DialogsProvider
::
showSimpleOpen
();
int
i
=
0
;
foreach
(
QString
file
,
files
)
foreach
(
const
QString
&
file
,
files
)
{
playlist_Add
(
THEPL
,
qtu
(
toNativeSeparators
(
file
)
),
NULL
,
go
?
(
PLAYLIST_APPEND
|
(
i
?
0
:
PLAYLIST_GO
)
|
...
...
@@ -498,7 +498,7 @@ void DialogsProvider::openAPlaylist()
{
QStringList
files
=
showSimpleOpen
(
qtr
(
"Open playlist..."
),
EXT_FILTER_PLAYLIST
);
foreach
(
QString
file
,
files
)
foreach
(
const
QString
&
file
,
files
)
{
playlist_Import
(
THEPL
,
qtu
(
toNativeSeparators
(
file
)
)
);
}
...
...
@@ -612,8 +612,7 @@ void DialogsProvider::loadSubtitlesFile()
EXT_FILTER_SUBTITLE
,
path
);
free
(
path
);
QString
qsFile
;
foreach
(
qsFile
,
qsl
)
foreach
(
const
QString
&
qsFile
,
qsl
)
{
if
(
input_AddSubtitle
(
p_input
,
qtu
(
toNativeSeparators
(
qsFile
)
),
true
)
)
...
...
modules/gui/qt4/main_interface.cpp
View file @
034e5706
...
...
@@ -995,7 +995,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
}
}
bool
first
=
b_play
;
foreach
(
QUrl
url
,
mimeData
->
urls
()
)
foreach
(
const
QUrl
&
url
,
mimeData
->
urls
()
)
{
QString
s
=
toNativeSeparators
(
url
.
toLocalFile
()
);
...
...
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