work save: todo list

This commit is contained in:
royqh1979 2021-10-21 08:04:41 +08:00
parent a5acb077fc
commit 45da8562d5
4 changed files with 24 additions and 6 deletions

View File

@ -2374,7 +2374,7 @@ void MainWindow::enableDebugActions()
ui->cbMemoryAddress->setEnabled(true);
}
void MainWindow::onTodoParseStarted()
void MainWindow::onTodoParseStarted(const QString& filename)
{
mTodoModel.clear();
}

View File

@ -161,7 +161,7 @@ public slots:
void onEditorTabContextMenu(QTabWidget* tabWidget, const QPoint& pos);
void disableDebugActions();
void enableDebugActions();
void onTodoParseStarted();
void onTodoParseStarted(const QString& filename);
void onTodoParsing(const QString& filename, int lineNo, int ch, const QString& line);
void onTodoParseFinished();

View File

@ -85,12 +85,16 @@
<enum>QTabWidget::West</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<property name="usesScrollButtons">
<bool>true</bool>
</property>
<widget class="QWidget" name="tabProject">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/049-newproj.png</normaloff>:/icons/images/newlook24/049-newproj.png</iconset>
</attribute>
<attribute name="title">
<string>Project</string>
</attribute>
@ -126,6 +130,10 @@
</layout>
</widget>
<widget class="QWidget" name="tabWatch">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/088-watch.png</normaloff>:/icons/images/newlook24/088-watch.png</iconset>
</attribute>
<attribute name="title">
<string>Watch</string>
</attribute>
@ -161,6 +169,10 @@
</layout>
</widget>
<widget class="QWidget" name="tabStructure">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/087-update.png</normaloff>:/icons/images/newlook24/087-update.png</iconset>
</attribute>
<attribute name="title">
<string>Structure</string>
</attribute>
@ -283,7 +295,13 @@
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<widget class="QWidget" name="tabIssues">
<attribute name="icon">
@ -826,7 +844,7 @@
<widget class="QWidget" name="tabTODO">
<attribute name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/images/newlook24/039-gobook.png</normaloff>:/icons/images/newlook24/039-gobook.png</iconset>
<normaloff>:/icons/images/newlook24/047-makefl.png</normaloff>:/icons/images/newlook24/047-makefl.png</iconset>
</attribute>
<attribute name="title">
<string>TODO</string>

View File

@ -43,7 +43,7 @@ class TodoThread: public QThread
public:
explicit TodoThread(const QString& filename, QObject* parent = nullptr);
signals:
void parseStarted();
void parseStarted(const QString& filename);
void todoFound(const QString& filename, int lineNo, int ch, const QString& line);
void parseFinished();
private: