diff options
author | Saturneric <[email protected]> | 2021-12-12 09:36:08 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-12 09:36:08 +0000 |
commit | e3792543f6d8b8dd8b0af78194967cc70448873f (patch) | |
tree | 7b078a5b437576e8021c2bb90a570c3f1969fbfe /src/ui/widgets/TextEdit.cpp | |
parent | Add Support For UI Header include Path (diff) | |
download | GpgFrontend-e3792543f6d8b8dd8b0af78194967cc70448873f.tar.gz GpgFrontend-e3792543f6d8b8dd8b0af78194967cc70448873f.zip |
Fixed & Modified & Added.
1. Fixed UTF-16 & UTF-8 filesystem path's bugs.
2. Added mkdir & create empty file.
3. Improve file browser.
4. Added Infoboard.ui.
5. Fixed Verify Bugs.
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r-- | src/ui/widgets/TextEdit.cpp | 6 |
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() { |