Skip to content

Commit

Permalink
automatically update and scroll the job log
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 12, 2024
1 parent c6bf882 commit b58e942
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/docks/jobsdock.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2022 Meltytech, LLC
* Copyright (c) 2012-2024 Meltytech, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -142,7 +142,11 @@ void JobsDock::on_actionViewLog_triggered()
TextViewerDialog dialog(this);
dialog.setWindowTitle(tr("Job Log"));
dialog.setText(job->log());
auto connection = connect(job, &AbstractJob::progressUpdated, this, [&]() {
dialog.setText(job->log(), true);
});
dialog.exec();
disconnect(connection);
}
}

Expand Down

0 comments on commit b58e942

Please sign in to comment.