Removing plugin system is holding back development to much.
This commit is contained in:
parent
048843a1d4
commit
edb789ca4a
22 changed files with 198 additions and 562 deletions
|
|
@ -22,16 +22,15 @@
|
|||
#include "plugin_support/IPluginContentWidgetContext.h"
|
||||
|
||||
|
||||
QueryTool::QueryTool(IPluginContentWidgetContext *context_, PluginModule *module, QWidget *parent)
|
||||
: PluginContentWidget(context_, module, parent)
|
||||
QueryTool::QueryTool(std::shared_ptr<OpenDatabase> open_database, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::QueryTab)
|
||||
, m_dbConnection(*getGlobalAsioIoService())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
auto db = context()->getObject<OpenDatabase>();
|
||||
m_config = db->config();
|
||||
m_catalog = db->catalog();
|
||||
m_config = open_database->config();
|
||||
m_catalog = open_database->catalog();
|
||||
|
||||
connect(&m_dbConnection, &ASyncDBConnection::onStateChanged, this, &QueryTool::connectionStateChanged);
|
||||
connect(&m_dbConnection, &ASyncDBConnection::onNotice, this, &QueryTool::receiveNotice);
|
||||
|
|
@ -39,11 +38,7 @@ QueryTool::QueryTool(IPluginContentWidgetContext *context_, PluginModule *module
|
|||
ui->queryEdit->setFont(UserConfiguration::instance()->codeFont());
|
||||
|
||||
highlighter = new SqlSyntaxHighlighter(ui->queryEdit->document());
|
||||
auto open_database = context()->getObject<OpenDatabase>();
|
||||
if (open_database) {
|
||||
auto cat = open_database->catalog();
|
||||
highlighter->setTypes(*cat->types());
|
||||
}
|
||||
highlighter->setTypes(*m_catalog->types());
|
||||
|
||||
initActions();
|
||||
|
||||
|
|
@ -232,7 +227,7 @@ void QueryTool::setFileName(const QString &filename)
|
|||
m_fileName = filename;
|
||||
QFileInfo fileInfo(filename);
|
||||
QString fn(fileInfo.fileName());
|
||||
context()->setCaption(this, fn, m_fileName);
|
||||
// context()->setCaption(this, fn, m_fileName);
|
||||
}
|
||||
|
||||
bool QueryTool::continueWithoutSavingWarning()
|
||||
|
|
@ -307,7 +302,7 @@ void QueryTool::connectionStateChanged(ASyncDBConnection::State state)
|
|||
case ASyncDBConnection::State::Terminating:
|
||||
break;
|
||||
}
|
||||
context()->setIcon(this, iconname);
|
||||
// context()->setIcon(this, iconname);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -396,7 +391,7 @@ void QueryTool::explain_ready(ExplainRoot::SPtr explain)
|
|||
ui->explainTreeView->setColumnWidth(6, 600);
|
||||
ui->tabWidget->setCurrentWidget(ui->explainTab);
|
||||
|
||||
context()->showStatusMessage(tr("Explain ready."));
|
||||
// context()->showStatusMessage(tr("Explain ready."));
|
||||
}
|
||||
else {
|
||||
addLog("Explain no result");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue