1
0
Fork 0

DBG/GUI: Move default script register to dbginit function

This commit is contained in:
Nukem 2016-01-06 15:36:44 -05:00
parent a6e658c61b
commit b0304a1a36
2 changed files with 7 additions and 8 deletions

View File

@ -328,6 +328,13 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
varinit();
dputs("Registering debugger commands...");
registercommands();
dputs("Registering GUI commaner handler...");
SCRIPTTYPEINFO info;
strcpy_s(info.name, "Default");
info.id = 0;
info.execute = DbgCmdExec;
info.completeCommand = nullptr;
GuiRegisterScriptLanguage(&info);
dputs("Starting command loop...");
hCommandLoopThread = CreateThread(0, 0, DbgCommandLoopThread, 0, 0, 0);
char plugindir[deflen] = "";

View File

@ -13,14 +13,6 @@ CommandLineEdit::CommandLineEdit(QWidget* parent) : HistoryLineEdit(parent)
mCompleterModel = (QStringListModel*)mCompleter->model();
this->setCompleter(mCompleter);
// Initialize default script execute function
SCRIPTTYPEINFO info;
strcpy(info.name, "Default");
info.id = 0;
info.execute = DbgCmdExec;
info.completeCommand = nullptr;
registerScriptType(&info);
//Setup signals & slots
connect(mCompleter, SIGNAL(activated(const QString &)), this, SLOT(clear()), Qt::QueuedConnection);
connect(this, SIGNAL(textChanged(QString)), this, SLOT(autoCompleteUpdate(QString)));