Merge branch 'master' of github.com:royqh1979/RedPanda-CPP
This commit is contained in:
commit
7f02b4c6c3
1
NEWS.md
1
NEWS.md
|
@ -4,6 +4,7 @@ Version 0.12.5 For Dev-C++ 7 Beta
|
||||||
- fix: can't reformat code
|
- fix: can't reformat code
|
||||||
- enhancement: add option for setting astyle path
|
- enhancement: add option for setting astyle path
|
||||||
- fix: wrong file wildcard (*.*) in linux
|
- fix: wrong file wildcard (*.*) in linux
|
||||||
|
- fix: open terminal in linux
|
||||||
|
|
||||||
Version 0.12.4 For Dev-C++ 7 Beta
|
Version 0.12.4 For Dev-C++ 7 Beta
|
||||||
- change: add copyright infos to each source file
|
- change: add copyright infos to each source file
|
||||||
|
|
|
@ -2582,7 +2582,11 @@ void MainWindow::buildContextMenus()
|
||||||
QString path = mFileSystemModel.filePath(ui->treeFiles->currentIndex());
|
QString path = mFileSystemModel.filePath(ui->treeFiles->currentIndex());
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
QFileInfo fileInfo(path);
|
QFileInfo fileInfo(path);
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
openShell(fileInfo.path(),"cmd.exe");
|
openShell(fileInfo.path(),"cmd.exe");
|
||||||
|
#else
|
||||||
|
openShell(fileInfo.path(),pSettings->environment().terminalPath());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mFilesView_OpenInExplorer = createActionFor(
|
mFilesView_OpenInExplorer = createActionFor(
|
||||||
|
@ -2700,6 +2704,7 @@ void MainWindow::openShell(const QString &folder, const QString &shellCommand)
|
||||||
QProcess process;
|
QProcess process;
|
||||||
process.setWorkingDirectory(folder);
|
process.setWorkingDirectory(folder);
|
||||||
process.setProgram(shellCommand);
|
process.setProgram(shellCommand);
|
||||||
|
qDebug()<<shellCommand;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
process.setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments * args){
|
process.setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments * args){
|
||||||
args->flags |= CREATE_NEW_CONSOLE;
|
args->flags |= CREATE_NEW_CONSOLE;
|
||||||
|
@ -4770,7 +4775,11 @@ void MainWindow::on_actionOpen_Terminal_triggered()
|
||||||
if (editor) {
|
if (editor) {
|
||||||
QFileInfo info(editor->filename());
|
QFileInfo info(editor->filename());
|
||||||
if (!info.path().isEmpty()) {
|
if (!info.path().isEmpty()) {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
openShell(info.path(),"cmd.exe");
|
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)
|
if (!mProject)
|
||||||
return;
|
return;
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
openShell(mProject->directory(),"cmd.exe");
|
openShell(mProject->directory(),"cmd.exe");
|
||||||
|
#else
|
||||||
|
openShell(mProject->directory(),pSettings->environment().terminalPath());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > &MainWindow::statementColors() const
|
const std::shared_ptr<QHash<StatementKind, std::shared_ptr<ColorSchemeItem> > > &MainWindow::statementColors() const
|
||||||
|
|
Loading…
Reference in New Issue