Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
413504f1
Commit
413504f1
authored
Dec 15, 2009
by
Hugo Beauzee-Luyssen
Browse files
Adding consistency to the crash handler widget (title, close and restart button)
Rstart is functionnal.
parent
c070b972
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/GUI/widgets/CrashHandler.cpp
View file @
413504f1
...
...
@@ -26,7 +26,7 @@
#endif
#include
<signal.h>
#include
<QProcess>
#include
"CrashHandler.h"
#include
"ui_CrashHandler.h"
...
...
@@ -36,6 +36,8 @@ CrashHandler::CrashHandler( int sig, QWidget *parent ) :
ui
(
new
Ui
::
CrashHandler
)
{
ui
->
setupUi
(
this
);
connect
(
ui
->
okButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
close
()
)
);
connect
(
ui
->
restartButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
restart
()
)
);
#ifndef WIN32
void
*
buff
[
CrashHandler
::
backtraceSize
];
...
...
@@ -63,7 +65,7 @@ CrashHandler::~CrashHandler()
delete
ui
;
}
void
CrashHandler
::
changeEvent
(
QEvent
*
e
)
void
CrashHandler
::
changeEvent
(
QEvent
*
e
)
{
QWidget
::
changeEvent
(
e
);
switch
(
e
->
type
()
)
...
...
@@ -75,3 +77,15 @@ void CrashHandler::changeEvent(QEvent *e)
break
;
}
}
void
CrashHandler
::
close
()
{
accept
();
}
void
CrashHandler
::
restart
()
{
QProcess
*
p
=
new
QProcess
();
p
->
start
(
"./vlmc"
);
close
();
}
src/GUI/widgets/CrashHandler.h
View file @
413504f1
...
...
@@ -41,6 +41,10 @@ class CrashHandler : public QDialog
protected:
void
changeEvent
(
QEvent
*
e
);
private
slots
:
void
close
();
void
restart
();
private:
Ui
::
CrashHandler
*
ui
;
static
const
int
backtraceSize
=
256
;
...
...
src/GUI/widgets/CrashHandler.ui
View file @
413504f1
...
...
@@ -11,7 +11,7 @@
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
<string>
VLMC Crash handler
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<property
name=
"margin"
>
...
...
@@ -151,9 +151,16 @@
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"
close
Button"
>
<widget
class=
"QPushButton"
name=
"
ok
Button"
>
<property
name=
"text"
>
<string>
PushButton
</string>
<string>
Ok
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"restartButton"
>
<property
name=
"text"
>
<string>
Restart
</string>
</property>
</widget>
</item>
...
...
Write
Preview
Supports
Markdown
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