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
5a9b7f9d
Commit
5a9b7f9d
authored
Jan 08, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open dialog: fix segfault on capture cards and fix the problematic layout on Win32.
parent
ebc34a37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
64 deletions
+35
-64
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+17
-20
modules/gui/qt4/ui/open.ui
modules/gui/qt4/ui/open.ui
+18
-44
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
5a9b7f9d
...
...
@@ -909,7 +909,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CaptureOpenPanel
::~
CaptureOpenPanel
()
{
if
(
adv
)
delete
adv
;
}
void
CaptureOpenPanel
::
clear
()
...
...
@@ -1046,37 +1045,42 @@ void CaptureOpenPanel::updateButtons()
break
;
}
if
(
adv
)
{
delete
adv
;
advMRL
.
clear
();
}
advMRL
.
clear
();
}
void
CaptureOpenPanel
::
advancedDialog
()
{
/* Get selected device type */
int
i_devicetype
=
ui
.
deviceCombo
->
itemData
(
ui
.
deviceCombo
->
currentIndex
()
).
toInt
();
/* Get the corresponding module */
module_t
*
p_module
=
module_Find
(
VLC_OBJECT
(
p_intf
),
psz_devModule
[
i_devicetype
]
);
if
(
NULL
==
p_module
)
return
;
unsigned
int
i_confsize
;
/* Init */
QList
<
ConfigControl
*>
controls
;
/* Get the confsize */
unsigned
int
i_confsize
;
module_config_t
*
p_config
;
p_config
=
module_GetConfig
(
p_module
,
&
i_confsize
);
/* New Adv Prop dialog */
adv
=
new
QDialog
(
this
);
adv
->
setWindowTitle
(
qtr
(
"Advanced options..."
)
);
/* A main Layout with a Frame */
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
adv
);
//TODO QScrollArea
QFrame
*
advFrame
=
new
QFrame
;
mainLayout
->
addWidget
(
advFrame
);
/* GridLayout inside the Frame */
QGridLayout
*
gLayout
=
new
QGridLayout
(
advFrame
);
/* Create the options inside the FrameLayout */
for
(
int
n
=
0
;
n
<
i_confsize
;
n
++
)
{
module_config_t
*
p_item
=
p_config
+
n
;
...
...
@@ -1085,17 +1089,7 @@ void CaptureOpenPanel::advancedDialog()
controls
.
append
(
config
);
}
/* QGroupBox *optionGroup = new QGroupBox( qtr( "Advanced options..." ) );
QHBoxLayout *grLayout = new QHBoxLayout( optionGroup );
QLabel *optionLabel = new QLabel( qtr( "Options" ) + ":" );
grLayout->addWidget( optionLabel );
QLineEdit *optionLine = new QLineEdit;
grLayout->addWidget( optionLine );
gLayout->addWidget( optionGroup, i_confsize, 0, 1, -1 );*/
/* Button stuffs */
QDialogButtonBox
*
advButtonBox
=
new
QDialogButtonBox
(
adv
);
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"Ok"
)
);
QPushButton
*
cancelButton
=
new
QPushButton
(
qtr
(
"Cancel"
)
);
...
...
@@ -1108,6 +1102,7 @@ void CaptureOpenPanel::advancedDialog()
gLayout
->
addWidget
(
advButtonBox
,
i_confsize
+
1
,
0
,
1
,
-
1
);
/* Creation of the MRL */
if
(
adv
->
exec
()
)
{
QString
tempMRL
=
""
;
...
...
@@ -1123,7 +1118,7 @@ void CaptureOpenPanel::advancedDialog()
tempMRL
+=
(
i
?
" :"
:
":"
);
if
(
control
->
getType
()
==
CONFIG_ITEM_BOOL
)
if
(
!
(
qobject_cast
<
VIntConfigControl
*>
(
control
)
->
getValue
()
)
)
if
(
!
(
qobject_cast
<
VIntConfigControl
*>
(
control
)
->
getValue
()
)
)
tempMRL
+=
"no-"
;
tempMRL
+=
control
->
getName
();
...
...
@@ -1145,7 +1140,9 @@ void CaptureOpenPanel::advancedDialog()
}
}
advMRL
=
tempMRL
;
msg_Dbg
(
p_intf
,
"%s"
,
qtu
(
advMRL
)
);
updateMRL
();
msg_Dbg
(
p_intf
,
"%s"
,
qtu
(
advMRL
)
);
}
delete
adv
;
}
modules/gui/qt4/ui/open.ui
View file @
5a9b7f9d
...
...
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>4
50
</width>
<height>2
96
</height>
<width>4
32
</width>
<height>2
85
</height>
</rect>
</property>
<property name="sizePolicy" >
...
...
@@ -22,8 +22,8 @@
<property name="windowTitle" >
<string>Dialog</string>
</property>
<layout class="Q
VBox
Layout" >
<item>
<layout class="Q
Grid
Layout" >
<item
row="0" column="0" colspan="2"
>
<widget class="QTabWidget" name="Tab" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
...
...
@@ -36,7 +36,7 @@
</property>
</widget>
</item>
<item>
<item
row="1" column="0" colspan="2"
>
<widget class="QCheckBox" name="advancedCheckBox" >
<property name="toolTip" >
<string>_("Show extended options")</string>
...
...
@@ -46,7 +46,7 @@
</property>
</widget>
</item>
<item>
<item
row="2" column="0" colspan="2"
>
<widget class="QFrame" name="advancedFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
...
...
@@ -180,57 +180,31 @@
</layout>
</widget>
</item>
<item>
<item
row="3" column="0"
>
<spacer>
<property name="orientation" >
<enum>Qt::
Vertic
al</enum>
<enum>Qt::
Horizont
al</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum
Expanding
</enum>
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>
1
</height>
<width>2
4
0</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<
layout class="QHBoxLayout
" >
<property name="
spacing
" >
<
number>6</number
>
<item
row="3" column="1"
>
<
widget class="QDialogButtonBox" name="buttonsBox
" >
<property name="
orientation
" >
<
enum>Qt::Horizontal</enum
>
</property>
<property name="
margin
" >
<
number>0</number
>
<property name="
standardButtons
" >
<
set>QDialogButtonBox::NoButton</set
>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>240</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonsBox" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<set>QDialogButtonBox::NoButton</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
...
...
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