aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/TextEdit.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-12-13 18:46:23 +0000
committerGitHub <[email protected]>2021-12-13 18:46:23 +0000
commit5d8e24b7ce4620164c3268b4f1de43a30df19a86 (patch)
tree6defd5d68468a95de980752ccf2c4ef8a0753617 /src/ui/widgets/TextEdit.cpp
parentCreate SECURITY.md (diff)
parentUpdate Translations & README. (diff)
downloadGpgFrontend-5d8e24b7ce4620164c3268b4f1de43a30df19a86.tar.gz
GpgFrontend-5d8e24b7ce4620164c3268b4f1de43a30df19a86.zip
Merge pull request #32 from saturneric/developv2.0.2
v2.0.2-beta.2
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r--src/ui/widgets/TextEdit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp
index ec6c6c7a..036c69d4 100644
--- a/src/ui/widgets/TextEdit.cpp
+++ b/src/ui/widgets/TextEdit.cpp
@@ -77,12 +77,13 @@ void TextEdit::slotNewFileTab() const {
void TextEdit::slotOpenFile(QString& path) {
QFile file(path);
- LOG(INFO) << " path" << path.toStdString();
+ LOG(INFO) << "path" << path.toStdString();
auto result = file.open(QIODevice::ReadOnly | QIODevice::Text);
if (result) {
auto* page = new EditorPage(path);
QApplication::setOverrideCursor(Qt::WaitCursor);
- tabWidget->addTab(page, strippedName(path));
+ auto index = tabWidget->addTab(page, strippedName(path));
+ tabWidget->setTabIcon(index, QIcon(":file.png"));
tabWidget->setCurrentIndex(tabWidget->count() - 1);
QApplication::restoreOverrideCursor();
page->getTextPage()->setFocus();
@@ -96,7 +97,6 @@ void TextEdit::slotOpenFile(QString& path) {
}
file.close();
- LOG(INFO) << "done";
}
void TextEdit::slotOpen() {