diff --git a/NEWS.md b/NEWS.md index 5ce0cd5a..d72e9922 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ Version 0.12.5 For Dev-C++ 7 Beta - fix: can't reformat code - enhancement: add option for setting astyle path - fix: wrong file wildcard (*.*) in linux + - fix: open terminal in linux Version 0.12.4 For Dev-C++ 7 Beta - change: add copyright infos to each source file diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 3c1a80b9..b9b565f1 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -2582,7 +2582,11 @@ void MainWindow::buildContextMenus() QString path = mFileSystemModel.filePath(ui->treeFiles->currentIndex()); if (!path.isEmpty()) { QFileInfo fileInfo(path); +#ifdef Q_OS_WIN openShell(fileInfo.path(),"cmd.exe"); +#else + openShell(fileInfo.path(),pSettings->environment().terminalPath()); +#endif } }); mFilesView_OpenInExplorer = createActionFor( @@ -2700,6 +2704,7 @@ void MainWindow::openShell(const QString &folder, const QString &shellCommand) QProcess process; process.setWorkingDirectory(folder); process.setProgram(shellCommand); + qDebug()<flags |= CREATE_NEW_CONSOLE; @@ -4770,7 +4775,11 @@ void MainWindow::on_actionOpen_Terminal_triggered() if (editor) { QFileInfo info(editor->filename()); if (!info.path().isEmpty()) { +#ifdef Q_OS_WIN openShell(info.path(),"cmd.exe"); +#else + openShell(info.path(),pSettings->environment().terminalPath()); +#endif } } @@ -5075,7 +5084,11 @@ void MainWindow::on_actionProject_Open_In_Terminal_triggered() { if (!mProject) return; +#ifdef Q_OS_WIN openShell(mProject->directory(),"cmd.exe"); +#else + openShell(mProject->directory(),pSettings->environment().terminalPath()); +#endif } const std::shared_ptr > > &MainWindow::statementColors() const