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
c745ebb5
Commit
c745ebb5
authored
Aug 16, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: use count() iso size() on Qt Containers
parent
b7cf7dda
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
61 additions
and
61 deletions
+61
-61
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+4
-4
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+2
-2
modules/gui/qt4/components/playlist/ml_item.cpp
modules/gui/qt4/components/playlist/ml_item.cpp
+3
-3
modules/gui/qt4/components/playlist/ml_model.cpp
modules/gui/qt4/components/playlist/ml_model.cpp
+2
-2
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+4
-4
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+1
-1
modules/gui/qt4/components/sout/profile_selector.cpp
modules/gui/qt4/components/sout/profile_selector.cpp
+2
-2
modules/gui/qt4/dialogs/bookmarks.cpp
modules/gui/qt4/dialogs/bookmarks.cpp
+3
-3
modules/gui/qt4/dialogs/ml_configuration.cpp
modules/gui/qt4/dialogs/ml_configuration.cpp
+9
-9
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+9
-9
modules/gui/qt4/dialogs/plugins.cpp
modules/gui/qt4/dialogs/plugins.cpp
+1
-1
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs/vlm.cpp
+6
-6
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+1
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+1
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+6
-6
modules/gui/qt4/recents.cpp
modules/gui/qt4/recents.cpp
+2
-2
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+3
-3
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+2
-2
No files found.
modules/gui/qt4/components/controller.cpp
View file @
c745ebb5
...
@@ -112,10 +112,10 @@ void AbstractController::parseAndCreate( const QString& config,
...
@@ -112,10 +112,10 @@ void AbstractController::parseAndCreate( const QString& config,
QBoxLayout
*
controlLayout
)
QBoxLayout
*
controlLayout
)
{
{
QStringList
list
=
config
.
split
(
";"
,
QString
::
SkipEmptyParts
)
;
QStringList
list
=
config
.
split
(
";"
,
QString
::
SkipEmptyParts
)
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
list
.
count
();
i
++
)
{
{
QStringList
list2
=
list
.
at
(
i
).
split
(
"-"
);
QStringList
list2
=
list
.
at
(
i
).
split
(
"-"
);
if
(
list2
.
size
()
<
1
)
if
(
list2
.
count
()
<
1
)
{
{
msg_Warn
(
p_intf
,
"Parsing error 1. Please, report this."
);
msg_Warn
(
p_intf
,
"Parsing error 1. Please, report this."
);
continue
;
continue
;
...
@@ -130,7 +130,7 @@ void AbstractController::parseAndCreate( const QString& config,
...
@@ -130,7 +130,7 @@ void AbstractController::parseAndCreate( const QString& config,
continue
;
continue
;
}
}
if
(
list2
.
size
()
>
1
)
if
(
list2
.
count
()
>
1
)
{
{
i_option
=
list2
.
at
(
1
).
toInt
(
&
ok
);
i_option
=
list2
.
at
(
1
).
toInt
(
&
ok
);
if
(
!
ok
)
if
(
!
ok
)
...
@@ -471,7 +471,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
...
@@ -471,7 +471,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
if
(
frame
)
if
(
frame
)
{
{
QList
<
QToolButton
*>
allTButtons
=
frame
->
findChildren
<
QToolButton
*>
();
QList
<
QToolButton
*>
allTButtons
=
frame
->
findChildren
<
QToolButton
*>
();
for
(
int
i
=
0
;
i
<
allTButtons
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
allTButtons
.
count
();
i
++
)
applyAttributes
(
allTButtons
[
i
],
b_flat
,
b_big
);
applyAttributes
(
allTButtons
[
i
],
b_flat
,
b_big
);
}
}
else
else
...
...
modules/gui/qt4/components/open_panels.cpp
View file @
c745ebb5
...
@@ -596,7 +596,7 @@ NetOpenPanel::~NetOpenPanel()
...
@@ -596,7 +596,7 @@ NetOpenPanel::~NetOpenPanel()
if
(
!
mrlList
)
return
;
if
(
!
mrlList
)
return
;
QStringList
tempL
=
mrlList
->
stringList
();
QStringList
tempL
=
mrlList
->
stringList
();
while
(
tempL
.
size
()
>
8
)
tempL
.
removeFirst
();
while
(
tempL
.
count
()
>
8
)
tempL
.
removeFirst
();
getSettings
()
->
setValue
(
"Open/netMRL"
,
tempL
);
getSettings
()
->
setValue
(
"Open/netMRL"
,
tempL
);
...
@@ -1303,7 +1303,7 @@ void CaptureOpenPanel::advancedDialog()
...
@@ -1303,7 +1303,7 @@ void CaptureOpenPanel::advancedDialog()
if
(
adv
->
exec
()
)
if
(
adv
->
exec
()
)
{
{
QString
tempMRL
=
""
;
QString
tempMRL
=
""
;
for
(
int
i
=
0
;
i
<
controls
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
controls
.
count
();
i
++
)
{
{
ConfigControl
*
control
=
controls
[
i
];
ConfigControl
*
control
=
controls
[
i
];
...
...
modules/gui/qt4/components/playlist/ml_item.cpp
View file @
c745ebb5
...
@@ -124,14 +124,14 @@ MLItem* MLItem::child( int row ) const
...
@@ -124,14 +124,14 @@ MLItem* MLItem::child( int row ) const
void
MLItem
::
addChild
(
MLItem
*
child
,
int
row
)
void
MLItem
::
addChild
(
MLItem
*
child
,
int
row
)
{
{
assert
(
child
);
assert
(
child
);
children
.
insert
(
row
==-
1
?
children
.
size
()
:
row
,
child
);
children
.
insert
(
row
==-
1
?
children
.
count
()
:
row
,
child
);
}
}
void
MLItem
::
delChild
(
int
row
)
void
MLItem
::
delChild
(
int
row
)
{
{
if
(
!
childCount
()
)
return
;
// assert ?
if
(
!
childCount
()
)
return
;
// assert ?
MLItem
*
item
=
MLItem
*
item
=
children
.
takeAt
(
(
row
!=-
1
)
?
row
:
(
children
.
size
()
-
1
)
);
children
.
takeAt
(
(
row
!=-
1
)
?
row
:
(
children
.
count
()
-
1
)
);
assert
(
item
);
assert
(
item
);
delete
item
;
delete
item
;
}
}
...
@@ -143,7 +143,7 @@ int MLItem::rowOfChild( MLItem *item ) const
...
@@ -143,7 +143,7 @@ int MLItem::rowOfChild( MLItem *item ) const
int
MLItem
::
childCount
()
const
int
MLItem
::
childCount
()
const
{
{
return
children
.
size
();
return
children
.
count
();
}
}
MLItem
*
MLItem
::
parent
()
const
MLItem
*
MLItem
::
parent
()
const
...
...
modules/gui/qt4/components/playlist/ml_model.cpp
View file @
c745ebb5
...
@@ -235,7 +235,7 @@ void MLModel::remove( MLItem *item )
...
@@ -235,7 +235,7 @@ void MLModel::remove( MLItem *item )
void
MLModel
::
doDelete
(
QModelIndexList
list
)
void
MLModel
::
doDelete
(
QModelIndexList
list
)
{
{
for
(
int
i
=
0
;
i
<
list
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
list
.
count
();
++
i
)
{
{
int
id
=
getId
(
list
.
at
(
i
)
);
int
id
=
getId
(
list
.
at
(
i
)
);
ml_DeleteSimple
(
p_ml
,
id
);
ml_DeleteSimple
(
p_ml
,
id
);
...
@@ -562,7 +562,7 @@ void MLModel::popupInfo()
...
@@ -562,7 +562,7 @@ void MLModel::popupInfo()
QStringList
MLModel
::
selectedURIs
()
QStringList
MLModel
::
selectedURIs
()
{
{
QStringList
list
;
QStringList
list
;
for
(
int
i
=
0
;
i
<
current_selection
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
current_selection
.
count
();
i
++
)
{
{
QModelIndex
idx
=
current_selection
.
value
(
i
);
QModelIndex
idx
=
current_selection
.
value
(
i
);
MLItem
*
item
=
static_cast
<
MLItem
*
>
(
idx
.
internalPointer
()
);
MLItem
*
item
=
static_cast
<
MLItem
*
>
(
idx
.
internalPointer
()
);
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
c745ebb5
...
@@ -232,7 +232,7 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
...
@@ -232,7 +232,7 @@ void PLModel::dropMove( const PlMimeData * plMimeData, PLItem *target, int row )
{
{
QList
<
input_item_t
*>
inputItems
=
plMimeData
->
inputItems
();
QList
<
input_item_t
*>
inputItems
=
plMimeData
->
inputItems
();
QList
<
PLItem
*>
model_items
;
QList
<
PLItem
*>
model_items
;
playlist_item_t
*
pp_items
[
inputItems
.
size
()];
playlist_item_t
*
pp_items
[
inputItems
.
count
()];
PL_LOCK
;
PL_LOCK
;
...
@@ -510,7 +510,7 @@ int PLModel::rowCount( const QModelIndex &parent ) const
...
@@ -510,7 +510,7 @@ int PLModel::rowCount( const QModelIndex &parent ) const
QStringList
PLModel
::
selectedURIs
()
QStringList
PLModel
::
selectedURIs
()
{
{
QStringList
lst
;
QStringList
lst
;
for
(
int
i
=
0
;
i
<
current_selection
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
current_selection
.
count
();
i
++
)
{
{
const
PLItem
*
item
=
getItem
(
current_selection
[
i
]
);
const
PLItem
*
item
=
getItem
(
current_selection
[
i
]
);
if
(
item
)
if
(
item
)
...
@@ -690,7 +690,7 @@ void PLModel::takeItem( PLItem *item )
...
@@ -690,7 +690,7 @@ void PLModel::takeItem( PLItem *item )
void
PLModel
::
insertChildren
(
PLItem
*
node
,
QList
<
PLItem
*>&
items
,
int
i_pos
)
void
PLModel
::
insertChildren
(
PLItem
*
node
,
QList
<
PLItem
*>&
items
,
int
i_pos
)
{
{
assert
(
node
);
assert
(
node
);
int
count
=
items
.
size
();
int
count
=
items
.
count
();
if
(
!
count
)
return
;
if
(
!
count
)
return
;
printf
(
"Here I am
\n
"
);
printf
(
"Here I am
\n
"
);
beginInsertRows
(
index
(
node
,
0
),
i_pos
,
i_pos
+
count
-
1
);
beginInsertRows
(
index
(
node
,
0
),
i_pos
,
i_pos
+
count
-
1
);
...
@@ -783,7 +783,7 @@ void PLModel::doDelete( QModelIndexList selected )
...
@@ -783,7 +783,7 @@ void PLModel::doDelete( QModelIndexList selected )
void
PLModel
::
recurseDelete
(
QList
<
PLItem
*>
children
,
QModelIndexList
*
fullList
)
void
PLModel
::
recurseDelete
(
QList
<
PLItem
*>
children
,
QModelIndexList
*
fullList
)
{
{
for
(
int
i
=
children
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
int
i
=
children
.
count
()
-
1
;
i
>=
0
;
i
--
)
{
{
PLItem
*
item
=
children
[
i
];
PLItem
*
item
=
children
[
i
];
if
(
item
->
childCount
()
)
if
(
item
->
childCount
()
)
...
...
modules/gui/qt4/components/preferences_widgets.cpp
View file @
c745ebb5
...
@@ -1450,7 +1450,7 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
...
@@ -1450,7 +1450,7 @@ void KeyInputDialog::checkForConflicts( int i_vlckey )
table
->
findItems
(
VLCKeyToString
(
i_vlckey
),
Qt
::
MatchExactly
,
table
->
findItems
(
VLCKeyToString
(
i_vlckey
),
Qt
::
MatchExactly
,
b_global
?
2
:
1
);
b_global
?
2
:
1
);
if
(
conflictList
.
size
()
&&
if
(
conflictList
.
count
()
&&
conflictList
[
0
]
->
data
(
b_global
?
2
:
1
,
Qt
::
UserRole
).
toInt
()
>
1
)
conflictList
[
0
]
->
data
(
b_global
?
2
:
1
,
Qt
::
UserRole
).
toInt
()
>
1
)
/* Avoid 0 or -1 that are the "Unset" states */
/* Avoid 0 or -1 that are the "Unset" states */
{
{
...
...
modules/gui/qt4/components/sout/profile_selector.cpp
View file @
c745ebb5
...
@@ -168,7 +168,7 @@ void VLCProfileSelector::saveProfiles()
...
@@ -168,7 +168,7 @@ void VLCProfileSelector::saveProfiles()
void
VLCProfileSelector
::
updateOptions
(
int
i
)
void
VLCProfileSelector
::
updateOptions
(
int
i
)
{
{
QStringList
options
=
profileBox
->
itemData
(
i
).
toString
().
split
(
";"
);
QStringList
options
=
profileBox
->
itemData
(
i
).
toString
().
split
(
";"
);
if
(
options
.
size
()
<
16
)
if
(
options
.
count
()
<
16
)
return
;
return
;
mux
=
options
[
0
];
mux
=
options
[
0
];
...
@@ -317,7 +317,7 @@ inline void VLCProfileEditor::registerCodecs()
...
@@ -317,7 +317,7 @@ inline void VLCProfileEditor::registerCodecs()
void
VLCProfileEditor
::
fillProfile
(
const
QString
&
qs
)
void
VLCProfileEditor
::
fillProfile
(
const
QString
&
qs
)
{
{
QStringList
options
=
qs
.
split
(
";"
);
QStringList
options
=
qs
.
split
(
";"
);
if
(
options
.
size
()
<
16
)
if
(
options
.
count
()
<
16
)
return
;
return
;
const
QString
mux
=
options
[
0
];
const
QString
mux
=
options
[
0
];
...
...
modules/gui/qt4/dialogs/bookmarks.cpp
View file @
c745ebb5
...
@@ -218,11 +218,11 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
...
@@ -218,11 +218,11 @@ void BookmarksDialog::edit( QTreeWidgetItem *item, int column )
else
if
(
column
==
2
)
else
if
(
column
==
2
)
{
{
fields
=
item
->
text
(
column
).
split
(
":"
,
QString
::
SkipEmptyParts
);
fields
=
item
->
text
(
column
).
split
(
":"
,
QString
::
SkipEmptyParts
);
if
(
fields
.
size
()
==
1
)
if
(
fields
.
count
()
==
1
)
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
);
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
);
else
if
(
fields
.
size
()
==
2
)
else
if
(
fields
.
count
()
==
2
)
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
*
60
+
fields
[
1
].
toInt
()
);
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
*
60
+
fields
[
1
].
toInt
()
);
else
if
(
fields
.
size
()
==
3
)
else
if
(
fields
.
count
()
==
3
)
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
*
3600
+
fields
[
1
].
toInt
()
*
60
+
fields
[
2
].
toInt
()
);
p_seekpoint
->
i_time_offset
=
1000000
*
(
fields
[
0
].
toInt
()
*
3600
+
fields
[
1
].
toInt
()
*
60
+
fields
[
2
].
toInt
()
);
else
else
{
{
...
...
modules/gui/qt4/dialogs/ml_configuration.cpp
View file @
c745ebb5
...
@@ -49,7 +49,7 @@ Qt::ItemFlags MLDirModel::flags( const QModelIndex &index ) const
...
@@ -49,7 +49,7 @@ Qt::ItemFlags MLDirModel::flags( const QModelIndex &index ) const
flags
|=
Qt
::
ItemIsUserCheckable
;
flags
|=
Qt
::
ItemIsUserCheckable
;
if
(
b_recursive
)
if
(
b_recursive
)
{
{
for
(
int
i
=
0
;
i
<
monitoredDirs
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
monitoredDirs
.
count
();
i
++
)
{
{
if
(
filePath
(
index
).
startsWith
(
monitoredDirs
.
at
(
i
)
)
)
if
(
filePath
(
index
).
startsWith
(
monitoredDirs
.
at
(
i
)
)
)
{
{
...
@@ -70,7 +70,7 @@ QVariant MLDirModel::data( const QModelIndex &index, int role ) const
...
@@ -70,7 +70,7 @@ QVariant MLDirModel::data( const QModelIndex &index, int role ) const
return
itemCheckState
.
value
(
filePath
(
index
)
);
return
itemCheckState
.
value
(
filePath
(
index
)
);
else
if
(
b_recursive
)
else
if
(
b_recursive
)
{
{
for
(
int
i
=
0
;
i
<
monitoredDirs
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
monitoredDirs
.
count
();
i
++
)
{
{
if
(
filePath
(
index
).
startsWith
(
monitoredDirs
.
at
(
i
)
)
)
if
(
filePath
(
index
).
startsWith
(
monitoredDirs
.
at
(
i
)
)
)
return
Qt
::
Checked
;
return
Qt
::
Checked
;
...
@@ -108,7 +108,7 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
...
@@ -108,7 +108,7 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
in recursive mode */
in recursive mode */
if
(
b_recursive
)
if
(
b_recursive
)
{
{
for
(
int
i
=
0
;
i
<
monitoredDirs
.
size
()
-
1
;
i
++
)
for
(
int
i
=
0
;
i
<
monitoredDirs
.
count
()
-
1
;
i
++
)
{
{
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
filePath
(
index
)
)
)
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
filePath
(
index
)
)
)
{
{
...
@@ -126,13 +126,13 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
...
@@ -126,13 +126,13 @@ bool MLDirModel::setData( const QModelIndex &index, const QVariant &value,
if index is his only child */
if index is his only child */
for
(
idx
=
index
.
parent
();
idx
!=
QModelIndex
();
idx
=
idx
.
parent
()
)
for
(
idx
=
index
.
parent
();
idx
!=
QModelIndex
();
idx
=
idx
.
parent
()
)
{
{
if
(
monitoredDirs
.
size
()
==
0
)
if
(
monitoredDirs
.
count
()
==
0
)
{
{
itemCheckState
.
take
(
filePath
(
idx
)
);
itemCheckState
.
take
(
filePath
(
idx
)
);
topLeft
=
idx
;
topLeft
=
idx
;
continue
;
continue
;
}
}
for
(
int
i
=
0
;
i
<
monitoredDirs
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
monitoredDirs
.
count
();
i
++
)
{
{
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
filePath
(
idx
)
)
)
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
filePath
(
idx
)
)
)
break
;
break
;
...
@@ -173,9 +173,9 @@ void MLDirModel::setRecursivity( bool _b_recursive )
...
@@ -173,9 +173,9 @@ void MLDirModel::setRecursivity( bool _b_recursive )
monitoredDirs some directories */
monitoredDirs some directories */
if
(
!
b_recursive
&&
_b_recursive
)
if
(
!
b_recursive
&&
_b_recursive
)
{
{
for
(
int
i
=
0
;
i
<
monitoredDirs
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
monitoredDirs
.
count
();
i
++
)
{
{
for
(
int
j
=
i
+
1
;
j
<
monitoredDirs
.
size
();
j
++
)
for
(
int
j
=
i
+
1
;
j
<
monitoredDirs
.
count
();
j
++
)
{
{
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
monitoredDirs
.
at
(
j
)
)
)
if
(
monitoredDirs
.
at
(
i
).
startsWith
(
monitoredDirs
.
at
(
j
)
)
)
{
{
...
@@ -271,11 +271,11 @@ void MLConfDialog::save()
...
@@ -271,11 +271,11 @@ void MLConfDialog::save()
}
}
}
}
for
(
int
i
=
0
;
i
<
toDelete
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
toDelete
.
count
();
i
++
)
{
{
ml_Control
(
p_ml
,
ML_DEL_MONITORED
,
qtu
(
toDelete
.
at
(
i
)
)
);
ml_Control
(
p_ml
,
ML_DEL_MONITORED
,
qtu
(
toDelete
.
at
(
i
)
)
);
}
}
for
(
int
i
=
0
;
i
<
newDirs
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
newDirs
.
count
();
i
++
)
{
{
ml_Control
(
p_ml
,
ML_ADD_MONITORED
,
qtu
(
newDirs
.
at
(
i
)
)
);
ml_Control
(
p_ml
,
ML_ADD_MONITORED
,
qtu
(
newDirs
.
at
(
i
)
)
);
}
}
...
...
modules/gui/qt4/dialogs/open.cpp
View file @
c745ebb5
...
@@ -198,7 +198,7 @@ OpenDialog::~OpenDialog()
...
@@ -198,7 +198,7 @@ OpenDialog::~OpenDialog()
/* Used by VLM dialog and inputSlave selection */
/* Used by VLM dialog and inputSlave selection */
QString
OpenDialog
::
getMRL
(
bool
b_all
)
QString
OpenDialog
::
getMRL
(
bool
b_all
)
{
{
if
(
itemsMRL
.
size
()
==
0
)
return
""
;
if
(
itemsMRL
.
count
()
==
0
)
return
""
;
return
b_all
?
itemsMRL
[
0
]
+
ui
.
advancedLineInput
->
text
()
return
b_all
?
itemsMRL
[
0
]
+
ui
.
advancedLineInput
->
text
()
:
itemsMRL
[
0
];
:
itemsMRL
[
0
];
}
}
...
@@ -359,7 +359,7 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -359,7 +359,7 @@ void OpenDialog::finish( bool b_enqueue = false )
itemsMRL
.
sort
();
itemsMRL
.
sort
();
/* Go through the item list */
/* Go through the item list */
for
(
int
i
=
0
;
i
<
itemsMRL
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
itemsMRL
.
count
();
i
++
)
{
{
bool
b_start
=
!
i
&&
!
b_enqueue
;
bool
b_start
=
!
i
&&
!
b_enqueue
;
...
@@ -374,7 +374,7 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -374,7 +374,7 @@ void OpenDialog::finish( bool b_enqueue = false )
QStringList
optionsList
=
ui
.
advancedLineInput
->
text
().
split
(
" :"
);
QStringList
optionsList
=
ui
.
advancedLineInput
->
text
().
split
(
" :"
);
/* Insert options */
/* Insert options */
for
(
int
j
=
0
;
j
<
optionsList
.
size
();
j
++
)
for
(
int
j
=
0
;
j
<
optionsList
.
count
();
j
++
)
{
{
QString
qs
=
colon_unescape
(
optionsList
[
j
]
);
QString
qs
=
colon_unescape
(
optionsList
[
j
]
);
if
(
!
qs
.
isEmpty
()
)
if
(
!
qs
.
isEmpty
()
)
...
@@ -461,10 +461,10 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
...
@@ -461,10 +461,10 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
QString
entry
;
QString
entry
;
int
index
=
0
;
int
index
=
0
;
while
(
index
<
entries
.
size
()
)
while
(
index
<
entries
.
count
()
)
{
{
int
delim_pos
=
entries
.
indexOf
(
QRegExp
(
"
\\
s+|
\"
"
),
index
);
int
delim_pos
=
entries
.
indexOf
(
QRegExp
(
"
\\
s+|
\"
"
),
index
);
if
(
delim_pos
<
0
)
delim_pos
=
entries
.
size
()
-
1
;
if
(
delim_pos
<
0
)
delim_pos
=
entries
.
count
()
-
1
;
entry
+=
entries
.
mid
(
index
,
delim_pos
-
index
+
1
);
entry
+=
entries
.
mid
(
index
,
delim_pos
-
index
+
1
);
index
=
delim_pos
+
1
;
index
=
delim_pos
+
1
;
...
@@ -473,22 +473,22 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
...
@@ -473,22 +473,22 @@ QStringList OpenDialog::SeparateEntries( const QString& entries )
if
(
!
b_quotes_mode
&&
entry
.
endsWith
(
"
\"
"
)
)
if
(
!
b_quotes_mode
&&
entry
.
endsWith
(
"
\"
"
)
)
{
{
/* Enters quotes mode */
/* Enters quotes mode */
entry
.
truncate
(
entry
.
size
()
-
1
);
entry
.
truncate
(
entry
.
count
()
-
1
);
b_quotes_mode
=
true
;
b_quotes_mode
=
true
;
}
}
else
if
(
b_quotes_mode
&&
entry
.
endsWith
(
"
\"
"
)
)
else
if
(
b_quotes_mode
&&
entry
.
endsWith
(
"
\"
"
)
)
{
{
/* Finished the quotes mode */
/* Finished the quotes mode */
entry
.
truncate
(
entry
.
size
()
-
1
);
entry
.
truncate
(
entry
.
count
()
-
1
);
b_quotes_mode
=
false
;
b_quotes_mode
=
false
;
}
}
else
if
(
!
b_quotes_mode
&&
!
entry
.
endsWith
(
"
\"
"
)
)
else
if
(
!
b_quotes_mode
&&
!
entry
.
endsWith
(
"
\"
"
)
)
{
{
/* we found a non-quoted standalone string */
/* we found a non-quoted standalone string */
if
(
index
<
entries
.
size
()
||
if
(
index
<
entries
.
count
()
||
entry
.
endsWith
(
" "
)
||
entry
.
endsWith
(
"
\t
"
)
||
entry
.
endsWith
(
" "
)
||
entry
.
endsWith
(
"
\t
"
)
||
entry
.
endsWith
(
"
\r
"
)
||
entry
.
endsWith
(
"
\n
"
)
)
entry
.
endsWith
(
"
\r
"
)
||
entry
.
endsWith
(
"
\n
"
)
)
entry
.
truncate
(
entry
.
size
()
-
1
);
entry
.
truncate
(
entry
.
count
()
-
1
);
if
(
!
entry
.
isEmpty
()
)
entries_array
.
append
(
entry
);
if
(
!
entry
.
isEmpty
()
)
entries_array
.
append
(
entry
);
entry
.
clear
();
entry
.
clear
();
}
}
...
...
modules/gui/qt4/dialogs/plugins.cpp
View file @
c745ebb5
...
@@ -380,7 +380,7 @@ QModelIndex ExtensionListModel::index( int row, int column,
...
@@ -380,7 +380,7 @@ QModelIndex ExtensionListModel::index( int row, int column,
{
{
if
(
column
!=
0
)
if
(
column
!=
0
)
return
QModelIndex
();
return
QModelIndex
();
if
(
row
<
0
||
row
>=
extensions
.
size
()
)
if
(
row
<
0
||
row
>=
extensions
.
count
()
)
return
QModelIndex
();
return
QModelIndex
();
return
createIndex
(
row
,
0
,
extensions
.
at
(
row
)
);
return
createIndex
(
row
,
0
,
extensions
.
at
(
row
)
);
...
...
modules/gui/qt4/dialogs/vlm.cpp
View file @
c745ebb5
...
@@ -186,7 +186,7 @@ void VLMDialog::selectVLMItem( int i )
...
@@ -186,7 +186,7 @@ void VLMDialog::selectVLMItem( int i )
bool
VLMDialog
::
isNameGenuine
(
const
QString
&
name
)
bool
VLMDialog
::
isNameGenuine
(
const
QString
&
name
)
{
{
for
(
int
i
=
0
;
i
<
vlmItems
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
vlmItems
.
count
();
i
++
)
{
{
if
(
vlmItems
.
at
(
i
)
->
name
==
name
)
if
(
vlmItems
.
at
(
i
)
->
name
==
name
)
return
false
;
return
false
;
...
@@ -196,7 +196,7 @@ bool VLMDialog::isNameGenuine( const QString& name )
...
@@ -196,7 +196,7 @@ bool VLMDialog::isNameGenuine( const QString& name )
void
VLMDialog
::
addVLMItem
()
void
VLMDialog
::
addVLMItem
()
{
{
int
vlmItemCount
=
vlmItems
.
size
();
int
vlmItemCount
=
vlmItems
.
count
();
/* Take the name and Check it */
/* Take the name and Check it */
QString
name
=
ui
.
nameLedit
->
text
();
QString
name
=
ui
.
nameLedit
->
text
();
...
@@ -295,7 +295,7 @@ void VLMDialog::mediasPopulator()
...
@@ -295,7 +295,7 @@ void VLMDialog::mediasPopulator()
for
(
int
i
=
0
;
i
<
i_nMedias
;
i
++
)
for
(
int
i
=
0
;
i
<
i_nMedias
;
i
++
)
{
{
VLMAWidget
*
vlmAwidget
;
VLMAWidget
*
vlmAwidget
;
vlmItemCount
=
vlmItems
.
size
();
vlmItemCount
=
vlmItems
.
count
();
QString
mediaName
=
qfu
(
(
*
ppp_dsc
)[
i
]
->
psz_name
);
QString
mediaName
=
qfu
(
(
*
ppp_dsc
)[
i
]
->
psz_name
);
/* It may have several inputs, we take the first one by default
/* It may have several inputs, we take the first one by default
...
@@ -694,7 +694,7 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input,
...
@@ -694,7 +694,7 @@ void VLMWrapper::EditBroadcast( const QString& name, const QString& input,
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
for
(
int
i
=
0
;
i
<
options
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
options
.
count
();
i
++
)
{
{
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
...
@@ -781,7 +781,7 @@ void VLMWrapper::EditVod( const QString& name, const QString& input,
...
@@ -781,7 +781,7 @@ void VLMWrapper::EditVod( const QString& name, const QString& input,
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
for
(
int
i
=
0
;
i
<
options
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
options
.
count
();
i
++
)
{
{
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
...
@@ -840,7 +840,7 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
...
@@ -840,7 +840,7 @@ void VLMWrapper::EditSchedule( const QString& name, const QString& input,
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
QStringList
options
=
inputOptions
.
split
(
" :"
,
QString
::
SkipEmptyParts
);
for
(
int
i
=
0
;
i
<
options
.
size
();
i
++
)
for
(
int
i
=
0
;
i
<
options
.
count
();
i
++
)
{
{
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
command
=
"setup
\"
"
+
name
+
"
\"
option
\"
"
+
options
[
i
].
trimmed
()
+
"
\"
"
;
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
c745ebb5
...
@@ -640,7 +640,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
...
@@ -640,7 +640,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
p_input
=
input_item_New
(
qtu
(
mrl
),
_
(
"Streaming"
)
);
p_input
=
input_item_New
(
qtu
(
mrl
),
_
(
"Streaming"
)
);
/* Add normal Options */
/* Add normal Options */
for
(
int
j
=
0
;
j
<
options
.
size
();
j
++
)
for
(
int
j
=
0
;
j
<
options
.
count
();
j
++
)
{
{
QString
qs
=
colon_unescape
(
options
[
j
]
);
QString
qs
=
colon_unescape
(
options
[
j
]
);
if
(
!
qs
.
isEmpty
()
)
if
(
!
qs
.
isEmpty
()
)
...
...
modules/gui/qt4/main_interface.cpp
View file @
c745ebb5
...
@@ -1160,7 +1160,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
...
@@ -1160,7 +1160,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
const
QMimeData
*
mimeData
=
event
->
mimeData
();
const
QMimeData
*
mimeData
=
event
->
mimeData
();
/* D&D of a subtitles file, add it on the fly */
/* D&D of a subtitles file, add it on the fly */
if
(
mimeData
->
urls
().
size
()
==
1
&&
THEMIM
->
getIM
()
->
hasInput
()
)
if
(
mimeData
->
urls
().
count
()
==
1
&&
THEMIM
->
getIM
()
->
hasInput
()
)
{
{
if
(
!
input_AddSubtitle
(
THEMIM
->
getInput
(),
if
(
!
input_AddSubtitle
(
THEMIM
->
getInput
(),
qtu
(
toNativeSeparators
(
mimeData
->
urls
()[
0
].
toLocalFile
()
)
),
qtu
(
toNativeSeparators
(
mimeData
->
urls
()[
0
].
toLocalFile
()
)
),
...
...
modules/gui/qt4/menus.cpp
View file @
c745ebb5
...
@@ -154,7 +154,7 @@ void EnableStaticEntries( QMenu *menu, bool enable = true )
...
@@ -154,7 +154,7 @@ void EnableStaticEntries( QMenu *menu, bool enable = true )
if
(
!
menu
)
return
;
if
(
!
menu
)
return
;
QList
<
QAction
*
>
actions
=
menu
->
actions
();
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
actions
.
count
();
++
i
)
{
{
actions
[
i
]
->
setEnabled
(
actions
[
i
]
->
data
().
toString
()
actions
[
i
]
->
setEnabled
(
actions
[
i
]
->
data
().
toString
()
==
ENTRY_ALWAYS_ENABLED
||
==
ENTRY_ALWAYS_ENABLED
||
...
@@ -173,7 +173,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
...
@@ -173,7 +173,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
int
i_ret
=
0
;
int
i_ret
=
0
;
QList
<
QAction
*
>
actions
=
menu
->
actions
();
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
actions
.
count
();
++
i
)
{
{
if
(
actions
[
i
]
->
data
().
toString
()
!=
STATIC_ENTRY
)
if
(
actions
[
i
]
->
data
().
toString
()
!=
STATIC_ENTRY
)
delete
actions
[
i
];
delete
actions
[
i
];
...
@@ -189,7 +189,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
...
@@ -189,7 +189,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
static
QAction
*
FindActionWithVar
(
QMenu
*
menu
,
const
char
*
psz_var
)
static
QAction
*
FindActionWithVar
(
QMenu
*
menu
,
const
char
*
psz_var
)
{
{
QList
<
QAction
*
>
actions
=
menu
->
actions
();
QList
<
QAction
*
>
actions
=
menu
->
actions
();
for
(
int
i
=
0
;
i
<
actions
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
actions
.
count
();
++
i
)
{
{
if
(
actions
[
i
]
->
data
().
toString
()
==
psz_var
)
if
(
actions
[
i
]
->
data
().
toString
()
==
psz_var
)
return
actions
[
i
];
return
actions
[
i
];
...
@@ -1113,7 +1113,7 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
...
@@ -1113,7 +1113,7 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
currentGroup
=
NULL
;
currentGroup
=
NULL
;
for
(
int
i
=
0
;
i
<
(
int
)
objects
.
size
()
;
i
++
)
for
(
int
i
=
0
;
i
<
(
int
)
objects
.
count
()
;
i
++
)
{
{
if
(
!
varnames
[
i
]
||
!*
varnames
[
i
]
)
if
(
!
varnames
[
i
]
||
!*
varnames
[
i
]
)
{
{
...
@@ -1478,14 +1478,14 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
...
@@ -1478,14 +1478,14 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
recentsMenu
->
clear
();
recentsMenu
->
clear
();
if
(
!
l
.
size
()
)
if
(
!
l
.
count
()
)
{
{
action
=
recentsMenu
->
addAction
(
qtr
(
" - Empty - "
)
);
action
=
recentsMenu
->
addAction
(
qtr
(
" - Empty - "
)
);
action
->
setEnabled
(
false
);
action
->
setEnabled
(
false
);
}
}
else
else
{
{
for
(
int
i
=
0
;
i
<
l
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
l
.
count
();
++
i
)
{
{
char
*
psz_temp
=
decode_URI_duplicate
(
qtu
(
l
.
at
(
i
)
)
);
char
*
psz_temp
=
decode_URI_duplicate
(
qtu
(
l
.
at
(
i
)
)
);
...
...
modules/gui/qt4/recents.cpp
View file @
c745ebb5
...
@@ -100,7 +100,7 @@ void RecentsMRL::addRecent( const QString &mrl )
...
@@ -100,7 +100,7 @@ void RecentsMRL::addRecent( const QString &mrl )
else
else
{
{
stack
->
prepend
(
mrl
);
stack
->
prepend
(
mrl
);
if
(
stack
->
size
()
>
RECENTS_LIST_SIZE
)
if
(
stack
->
count
()
>
RECENTS_LIST_SIZE
)
stack
->
takeLast
();
stack
->
takeLast
();
}
}
QVLCMenu
::
updateRecents
(
p_intf
);
QVLCMenu
::
updateRecents
(
p_intf
);
...
@@ -128,7 +128,7 @@ void RecentsMRL::load()
...
@@ -128,7 +128,7 @@ void RecentsMRL::load()
QStringList
list
=
getSettings
()
->
value
(
"RecentsMRL/list"
).
toStringList
();
QStringList
list
=
getSettings
()
->
value
(
"RecentsMRL/list"
).
toStringList
();
/* And filter the regexp on the list */
/* And filter the regexp on the list */
for
(
int
i
=
0
;
i
<
list
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
list
.
count
();
++
i
)
{
{
if
(
!
filter
||
filter
->
indexIn
(
list
.
at
(
i
)
)
==
-
1
)
if
(
!
filter
||
filter
->
indexIn
(
list
.
at
(
i
)
)
==
-
1
)
stack
->
append
(
list
.
at
(
i
)
);
stack
->
append
(
list
.
at
(
i
)
);
...
...
modules/gui/qt4/util/customwidgets.cpp
View file @
c745ebb5
...
@@ -327,7 +327,7 @@ void AnimatedIcon::addFrame( const QPixmap &pxm, int index )
...
@@ -327,7 +327,7 @@ void AnimatedIcon::addFrame( const QPixmap &pxm, int index )
return
;
return
;
}
}
QPixmap
*
copy
=
new
QPixmap
(
pxm
);
QPixmap
*
copy
=
new
QPixmap
(
pxm
);
mFrames
.
insert
(
(
index
<
0
||
index
>
mFrames
.
size
()
)
?
mFrames
.
size
()
:
mFrames
.
insert
(
(
index
<
0
||
index
>
mFrames
.
count
()
)
?
mFrames
.
count
()
:
index
,
copy
);
index
,
copy
);
if
(
!
pixmap
()
)
if
(
!
pixmap
()
)
setPixmap
(
*
copy
);
setPixmap
(
*
copy
);
...
@@ -374,7 +374,7 @@ void AnimatedIcon::play( int loops, int interval )
...
@@ -374,7 +374,7 @@ void AnimatedIcon::play( int loops, int interval )
void
AnimatedIcon
::
onTimerTick
()
void
AnimatedIcon
::
onTimerTick
()
{
{
//assert( !mFrames.empty() );
//assert( !mFrames.empty() );
if
(
++
mCurrentFrame
>
mFrames
.
size
()
)
if
(
++
mCurrentFrame
>
mFrames
.
count
()
)
{
{
if
(
mRemainingLoops
!=
-
1
)
if
(
mRemainingLoops
!=
-
1
)
{
{
...
@@ -387,7 +387,7 @@ void AnimatedIcon::onTimerTick()
...
@@ -387,7 +387,7 @@ void AnimatedIcon::onTimerTick()
}
}
mCurrentFrame
=
1
;
mCurrentFrame
=
1
;
}
}
//assert( mCurrentFrame >= 1 && mCurrentFrame <= mFrames.
size
() );
//assert( mCurrentFrame >= 1 && mCurrentFrame <= mFrames.
count
() );
setPixmap
(
*
mFrames
.
at
(
mCurrentFrame
-
1
)
);
setPixmap
(
*
mFrames
.
at
(
mCurrentFrame
-
1
)
);
}
}
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
c745ebb5
...
@@ -504,8 +504,8 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
...
@@ -504,8 +504,8 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
free
(
psz_colors
);
free
(
psz_colors
);
/* Fill with 255 if the list is too short */
/* Fill with 255 if the list is too short */
if
(
colorList
.
size
()
<
12
)
if
(
colorList
.
count
()
<
12
)
for
(
int
i
=
colorList
.
size
();
i
<
12
;
i
++
)
for
(
int
i
=
colorList
.
count
();
i
<
12
;
i
++
)
colorList
.
append
(
"255"
);
colorList
.
append
(
"255"
);
/* Regular colors */
/* Regular colors */
...
...
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