diff --git a/src/mainwindow.h b/src/mainwindow.h --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -25,11 +25,6 @@ #include #include -namespace Ui -{ -class MainWindow; -} - struct LateralArea { // Area with the the lateral buttons that will open the views. // Kind like the KDevelop stuff but way simpler. @@ -50,10 +45,8 @@ public: explicit MainWindow(QWidget *parent = nullptr); - ~MainWindow(); private: - Ui::MainWindow *ui; QList m_openFiles; KTextEditor::View *m_currEditorView; LateralArea m_lateral; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -36,11 +36,9 @@ MainWindow::MainWindow(QWidget *parent) : KXmlGuiWindow(parent), - ui(new Ui::MainWindow), m_currEditorView(nullptr), m_instances(new QTabWidget(this)) { - ui->setupUi(this); initWidgets(); setupActions(); connect(m_instances, &QTabWidget::tabCloseRequested, [this] (int index){ @@ -55,11 +53,6 @@ } -MainWindow::~MainWindow() -{ - delete ui; -} - void MainWindow::initWidgets() { @@ -75,7 +68,9 @@ splitter->addWidget(m_instances); centralLayout->addWidget(m_lateral.m_toolBar); centralLayout->addWidget(splitter); - ui->centralwidget->setLayout(centralLayout); + auto *centralWidget = new QWidget(); + centralWidget->setLayout(centralLayout); + setCentralWidget(centralWidget); } void MainWindow::newAtCoreInstance() { diff --git a/src/mainwindow.ui b/src/mainwindow.ui deleted file mode 100644 --- a/src/mainwindow.ui +++ /dev/null @@ -1,55 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 0 - 0 - - - - Atelier - - - - - - 0 - 0 - 1074 - 36 - - - - - Fi&le - - - - - Edit - - - - - - - - Qt::NoContextMenu - - - false - - - - - Teste - - - - - -