Skip to content

Commit 1be8461

Browse files
committed
[Refactor] Enhance status message display in MainWindow with timestamps for better user feedback
1 parent a714767 commit 1be8461

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/MainWindow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ MainWindow::MainWindow(QWidget *parent)
2121
{
2222
setWindowTitle("CodeAstra ~ Code Editor");
2323

24+
connect(m_editor.get(), &CodeEditor::statusMessageChanged, this, [this](const QString &message)
25+
{
26+
QString timestamp = QDateTime::currentDateTime().toString("hh:mm:ss");
27+
statusBar()->showMessage("[" + timestamp + "] " + message, 4000);
28+
});
29+
2430
// Set tab width to 4 spaces
2531
QFontMetrics metrics(m_editor->font());
2632
int spaceWidth = metrics.horizontalAdvance(" ");

0 commit comments

Comments
 (0)