work save
This commit is contained in:
parent
095a0897f2
commit
ee3864f565
|
@ -2678,7 +2678,7 @@ void Editor::showCompletion(const QString& preWord,bool autoComplete)
|
|||
caretXY(),
|
||||
memberOperator,
|
||||
memberExpression);
|
||||
qDebug()<<ownerExpression<<memberExpression;
|
||||
// qDebug()<<ownerExpression<<memberExpression;
|
||||
word = memberExpression.join("");
|
||||
mCompletionPopup->prepareSearch(
|
||||
preWord,
|
||||
|
|
|
@ -1802,20 +1802,18 @@ void MainWindow::updateTools()
|
|||
foreach (const PToolItem& item, mToolsManager->tools()) {
|
||||
QAction* action = new QAction(item->title,ui->menuTools);
|
||||
connect(action, &QAction::triggered,
|
||||
[item] (){
|
||||
if (item->pauseAfterExit
|
||||
&& programHasConsole(parseMacros(item->program))) {
|
||||
executeFile(
|
||||
includeTrailingPathDelimiter(pSettings->dirs().app())+"ConsolePauser.exe",
|
||||
" 0 \""+parseMacros(item->program)+"\" "+parseMacros(item->parameters),
|
||||
parseMacros(item->workingDirectory));
|
||||
} else {
|
||||
executeFile(
|
||||
[item,this] (){
|
||||
QString params = parseMacros(item->parameters);
|
||||
params.replace("/",QDir::separator());
|
||||
QByteArray newContent = runAndGetOutput(
|
||||
parseMacros(item->program),
|
||||
parseMacros(item->parameters),
|
||||
parseMacros(item->workingDirectory));
|
||||
|
||||
}
|
||||
parseMacros(item->workingDirectory),
|
||||
QProcess::splitCommand(params),
|
||||
QByteArray(),
|
||||
true
|
||||
);
|
||||
qDebug()<<"running"<<item->program;
|
||||
ui->txtCompilerOutput->appendPlainText(QString::fromLocal8Bit(newContent));
|
||||
});
|
||||
ui->menuTools->addAction(action);
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ void SettingsDialog::widget_settings_changed(bool value)
|
|||
ui->btnApply->setEnabled(value);
|
||||
}
|
||||
|
||||
void SettingsDialog::on_btnCancle_pressed()
|
||||
void SettingsDialog::on_btnCancel_pressed()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ private slots:
|
|||
void widget_settings_changed(bool value);
|
||||
void on_widgetsView_clicked(const QModelIndex &index);
|
||||
|
||||
void on_btnCancle_pressed();
|
||||
void on_btnCancel_pressed();
|
||||
|
||||
void on_btnApply_pressed();
|
||||
|
||||
|
|
|
@ -829,17 +829,6 @@ QString parseMacros(const QString &s)
|
|||
return result;
|
||||
}
|
||||
|
||||
void executeFile(const QString &fileName, const QString ¶ms, const QString &workingDir)
|
||||
{
|
||||
ShellExecuteA(NULL,
|
||||
NULL,
|
||||
fileName.toLocal8Bit(),
|
||||
params.toLocal8Bit(),
|
||||
workingDir.toLocal8Bit(),
|
||||
SW_SHOW
|
||||
);
|
||||
}
|
||||
|
||||
void stringToFile(const QString &str, const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
|
|
|
@ -121,8 +121,6 @@ QByteArray runAndGetOutput(const QString& cmd, const QString& workingDir, const
|
|||
const QByteArray& inputContent = QByteArray(),
|
||||
bool inheritEnvironment = false);
|
||||
|
||||
void executeFile(const QString& fileName, const QString& params, const QString& workingDir);
|
||||
|
||||
bool isNonPrintableAsciiChar(char ch);
|
||||
|
||||
bool fileExists(const QString& file);
|
||||
|
|
Loading…
Reference in New Issue