diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 6a4391f0..c56ee01b 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -26,6 +26,7 @@ SOURCES += \ qsynedit/SearchRegex.cpp \ settingsdialog/debuggeneralwidget.cpp \ widgets/classbrowser.cpp \ + widgets/codecompletionview.cpp \ widgets/cpudialog.cpp \ debugger.cpp \ editor.cpp \ @@ -89,6 +90,7 @@ HEADERS += \ qsynedit/SearchRegex.h \ settingsdialog/debuggeneralwidget.h \ widgets/classbrowser.h \ + widgets/codecompletionview.h \ widgets/cpudialog.h \ debugger.h \ editor.h \ @@ -137,6 +139,7 @@ HEADERS += \ FORMS += \ settingsdialog/debuggeneralwidget.ui \ + widgets/codecompletionview.ui \ widgets/cpudialog.ui \ mainwindow.ui \ settingsdialog/compilersetdirectorieswidget.ui \ diff --git a/RedPandaIDE/editorlist.cpp b/RedPandaIDE/editorlist.cpp index 85a37c64..61d8864e 100644 --- a/RedPandaIDE/editorlist.cpp +++ b/RedPandaIDE/editorlist.cpp @@ -92,6 +92,10 @@ bool EditorList::closeEditor(Editor* editor, bool transferFocus, bool force) { //editor->deleteLater(); delete editor; + + editor = getEditor(); + if (!force) + pMainWindow->updateClassBrowserForEditor(editor); return true; } diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index a4848b87..83e3c87e 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -394,6 +394,7 @@ void MainWindow::updateClassBrowserForEditor(Editor *editor) if (!editor) { mClassBrowserModel.setParser(nullptr); mClassBrowserModel.setCurrentFile(""); + mClassBrowserModel.clear(); return; } if (mQuitting) @@ -520,12 +521,8 @@ void MainWindow::checkSyntaxInBack(Editor *e) return; if (mCompilerManager->compiling()) return; -// if not Assigned(devCompilerSets.CompilationSet) then -// Exit; -// if fCompiler.Compiling then -// Exit; -// if fSyntaxChecker.Compiling then -// Exit; + if (!pSettings->compilerSets().defaultSet()) + return; if (mCheckSyntaxInBack) return; diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui index e2a8ca24..5f664bc1 100644 --- a/RedPandaIDE/mainwindow.ui +++ b/RedPandaIDE/mainwindow.ui @@ -150,7 +150,7 @@ - true + false false diff --git a/RedPandaIDE/widgets/codecompletionview.cpp b/RedPandaIDE/widgets/codecompletionview.cpp new file mode 100644 index 00000000..46b710bc --- /dev/null +++ b/RedPandaIDE/widgets/codecompletionview.cpp @@ -0,0 +1,14 @@ +#include "codecompletionview.h" +#include "ui_codecompletionview.h" + +CodeCompletionView::CodeCompletionView(QWidget *parent) : + QWidget(parent), + ui(new Ui::CodeCompletionView) +{ + ui->setupUi(this); +} + +CodeCompletionView::~CodeCompletionView() +{ + delete ui; +} diff --git a/RedPandaIDE/widgets/codecompletionview.h b/RedPandaIDE/widgets/codecompletionview.h new file mode 100644 index 00000000..8e77226a --- /dev/null +++ b/RedPandaIDE/widgets/codecompletionview.h @@ -0,0 +1,22 @@ +#ifndef CODECOMPLETIONVIEW_H +#define CODECOMPLETIONVIEW_H + +#include + +namespace Ui { +class CodeCompletionView; +} + +class CodeCompletionView : public QWidget +{ + Q_OBJECT + +public: + explicit CodeCompletionView(QWidget *parent = nullptr); + ~CodeCompletionView(); + +private: + Ui::CodeCompletionView *ui; +}; + +#endif // CODECOMPLETIONVIEW_H diff --git a/RedPandaIDE/widgets/codecompletionview.ui b/RedPandaIDE/widgets/codecompletionview.ui new file mode 100644 index 00000000..e84717ca --- /dev/null +++ b/RedPandaIDE/widgets/codecompletionview.ui @@ -0,0 +1,36 @@ + + + CodeCompletionView + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + +