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
64c4b59c
Commit
64c4b59c
authored
Apr 04, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: don't allow empty file on convert dialog (fix #11072)
parent
470602d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/convert.cpp
+9
-1
modules/gui/qt4/dialogs/convert.hpp
modules/gui/qt4/dialogs/convert.hpp
+3
-0
No files found.
modules/gui/qt4/dialogs/convert.cpp
View file @
64c4b59c
...
@@ -105,7 +105,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -105,7 +105,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
mainLayout
->
addWidget
(
settingBox
,
1
,
0
,
1
,
-
1
);
mainLayout
->
addWidget
(
settingBox
,
1
,
0
,
1
,
-
1
);
/* Buttons */
/* Buttons */
QPushButton
*
okButton
=
new
QPushButton
(
qtr
(
"&Start"
)
);
okButton
=
new
QPushButton
(
qtr
(
"&Start"
)
);
QPushButton
*
cancelButton
=
new
QPushButton
(
qtr
(
"&Cancel"
)
);
QPushButton
*
cancelButton
=
new
QPushButton
(
qtr
(
"&Cancel"
)
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
;
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
;
...
@@ -121,6 +121,9 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
...
@@ -121,6 +121,9 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
CONNECT
(
convertRadio
,
toggled
(
bool
),
convertPanel
,
setEnabled
(
bool
)
);
CONNECT
(
convertRadio
,
toggled
(
bool
),
convertPanel
,
setEnabled
(
bool
)
);
CONNECT
(
profile
,
optionsChanged
(),
this
,
setDestinationFileExtension
());
CONNECT
(
profile
,
optionsChanged
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
editingFinished
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
editingFinished
(),
this
,
setDestinationFileExtension
());
CONNECT
(
fileLine
,
textChanged
(
const
QString
&
),
this
,
validate
());
validate
();
}
}
void
ConvertDialog
::
fileBrowse
()
void
ConvertDialog
::
fileBrowse
()
...
@@ -182,3 +185,8 @@ void ConvertDialog::setDestinationFileExtension()
...
@@ -182,3 +185,8 @@ void ConvertDialog::setDestinationFileExtension()
}
}
}
}
}
}
void
ConvertDialog
::
validate
()
{
okButton
->
setEnabled
(
!
fileLine
->
text
().
isEmpty
()
);
}
modules/gui/qt4/dialogs/convert.hpp
View file @
64c4b59c
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
class
QLineEdit
;
class
QLineEdit
;
class
QCheckBox
;
class
QCheckBox
;
class
QRadioButton
;
class
QRadioButton
;
class
QPushButton
;
class
VLCProfileSelector
;
class
VLCProfileSelector
;
class
ConvertDialog
:
public
QVLCDialog
class
ConvertDialog
:
public
QVLCDialog
...
@@ -45,6 +46,7 @@ private:
...
@@ -45,6 +46,7 @@ private:
QCheckBox
*
displayBox
,
*
deinterBox
;
QCheckBox
*
displayBox
,
*
deinterBox
;
QRadioButton
*
dumpRadio
;
QRadioButton
*
dumpRadio
;
QPushButton
*
okButton
;
VLCProfileSelector
*
profile
;
VLCProfileSelector
*
profile
;
QString
mrl
;
QString
mrl
;
private
slots
:
private
slots
:
...
@@ -52,6 +54,7 @@ private slots:
...
@@ -52,6 +54,7 @@ private slots:
virtual
void
cancel
();
virtual
void
cancel
();
void
fileBrowse
();
void
fileBrowse
();
void
setDestinationFileExtension
();
void
setDestinationFileExtension
();
void
validate
();
};
};
#endif
#endif
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