diff --git a/src/src.pro b/src/src.pro index f8a3ae19..b72417a5 100644 --- a/src/src.pro +++ b/src/src.pro @@ -14,6 +14,8 @@ DEFINES += QT_MESSAGELOGCONTEXT TARGET = VNote TEMPLATE = app +CONFIG -= qtquickcompiler + RC_ICONS = resources/icons/vnote.ico ICON = resources/icons/vnote.icns @@ -316,8 +318,6 @@ HEADERS += vmainwindow.h \ RESOURCES += \ vnote.qrc \ translations.qrc - -QTQUICK_COMPILER_SKIPPED_RESOURCES += vnote.qrc macx { LIBS += -L/usr/local/lib diff --git a/src/vfilelist.cpp b/src/vfilelist.cpp index ba15b8d0..0b3f07d6 100644 --- a/src/vfilelist.cpp +++ b/src/vfilelist.cpp @@ -431,8 +431,10 @@ void VFileList::newFile() // Move cursor down if content has been inserted. if (moveCursorEnd) { - const VMdTab *tab = dynamic_cast(editArea->getCurrentTab()); + VMdTab *tab = dynamic_cast(editArea->getCurrentTab()); if (tab) { + // It will init markdown editor (within 50 ms) + // See VMdTab::VMdTab --> QTimer::singleShot(50, ... VMdEditor *edit = tab->getEditor(); if (edit && edit->getFile() == file) { QTextCursor cursor = edit->textCursor(); diff --git a/src/vmdtab.h b/src/vmdtab.h index fc468946..3c5d5416 100644 --- a/src/vmdtab.h +++ b/src/vmdtab.h @@ -71,6 +71,9 @@ public: void clearSearchedWordHighlight() Q_DECL_OVERRIDE; VWebView *getWebViewer() const; + + // Get the markdown editor. If not init yet, init and return it. + VMdEditor *getEditor(); VMdEditor *getEditor() const; @@ -226,9 +229,6 @@ private: // Focus the proper child widget. void focusChild() Q_DECL_OVERRIDE; - // Get the markdown editor. If not init yet, init and return it. - VMdEditor *getEditor(); - // Restore from @p_fino. // Return true if succeed. bool restoreFromTabInfo(const VEditTabInfo &p_info) Q_DECL_OVERRIDE;