mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 03:46:11 +00:00
dont use 'fork' (closes issue #20)
This commit is contained in:
parent
bcfd398d1d
commit
0cc548e96e
@ -1 +1 @@
|
|||||||
Subproject commit 67f5cc7119faddf1eac5dab6e4f4b7639d6a0a85
|
Subproject commit d06d30b2742899c0ac098374078a58848a9d2986
|
@ -20,6 +20,7 @@
|
|||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
|
#include <QProcess>
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
@ -959,17 +960,8 @@ void MainWindow::add_debug_output(QString msg)
|
|||||||
|
|
||||||
void MainWindow::on_actionNew_triggered()
|
void MainWindow::on_actionNew_triggered()
|
||||||
{
|
{
|
||||||
QString path = qApp->applicationDirPath();
|
qApp->quit();
|
||||||
eprintf ("(((%s)))\n", path.toLocal8Bit().data());
|
on_actionLoad_triggered();
|
||||||
int pid = fork();
|
|
||||||
if (pid==-1)
|
|
||||||
return;
|
|
||||||
if(!pid) {
|
|
||||||
QString cmd = path+ "/iaito";
|
|
||||||
system (cmd.toLocal8Bit().data());
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSave_triggered()
|
void MainWindow::on_actionSave_triggered()
|
||||||
@ -1016,15 +1008,10 @@ void MainWindow::on_actionSDB_browser_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionLoad_triggered()
|
void MainWindow::on_actionLoad_triggered()
|
||||||
{
|
{
|
||||||
QString path = qApp->applicationDirPath();
|
QProcess* process = new QProcess(this);
|
||||||
eprintf ("(((%s)))\n", path.toLocal8Bit().data());
|
process->setProgram(qApp->applicationFilePath());
|
||||||
int pid = fork();
|
process->setEnvironment(QProcess::systemEnvironment());
|
||||||
if (pid==-1)
|
process->start();
|
||||||
return;
|
|
||||||
if(!pid) {
|
|
||||||
QString cmd = path+ "/iaito";
|
|
||||||
exit(system (cmd.toLocal8Bit().data()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionShow_Hide_mainsidebar_triggered()
|
void MainWindow::on_actionShow_Hide_mainsidebar_triggered()
|
||||||
|
Loading…
Reference in New Issue
Block a user