mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
small fix
This commit is contained in:
parent
dd935b5f90
commit
6aa0e98993
1
.github/workflows/ci-macos.yml
vendored
1
.github/workflows/ci-macos.yml
vendored
@ -90,7 +90,6 @@ jobs:
|
|||||||
- name: Mac Deploy
|
- name: Mac Deploy
|
||||||
run: |
|
run: |
|
||||||
pushd src
|
pushd src
|
||||||
sed -i -e 's/com.yourcompany.vnote/com.vnotex.vnote/g' vnote.app/Contents/Info.plist
|
|
||||||
macdeployqt vnote.app
|
macdeployqt vnote.app
|
||||||
python ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py vnote.app/Contents/MacOS/vnote $Qt5_Dir
|
python ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py vnote.app/Contents/MacOS/vnote $Qt5_Dir
|
||||||
# Fix Helpers/QtWebEngineProcess.app
|
# Fix Helpers/QtWebEngineProcess.app
|
||||||
|
@ -84,7 +84,7 @@ void ClipboardData::fromJson(const QJsonObject &p_jobj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto itemArr = p_jobj[c_data].toArray();
|
const auto itemArr = p_jobj[c_data].toArray();
|
||||||
for (size_t i = 0; i < itemArr.size(); ++i) {
|
for (int i = 0; i < itemArr.size(); ++i) {
|
||||||
auto dataItem = createClipboardDataItem(m_action);
|
auto dataItem = createClipboardDataItem(m_action);
|
||||||
dataItem->fromJson(itemArr[i].toObject());
|
dataItem->fromJson(itemArr[i].toObject());
|
||||||
m_data.push_back(dataItem);
|
m_data.push_back(dataItem);
|
||||||
|
@ -71,7 +71,7 @@ void VXNotebookConfigMgr::NodeFileConfig::fromJson(const QJsonObject &p_jobj)
|
|||||||
|
|
||||||
{
|
{
|
||||||
auto arr = p_jobj[NodeConfig::c_tags].toArray();
|
auto arr = p_jobj[NodeConfig::c_tags].toArray();
|
||||||
for (size_t i = 0; i < arr.size(); ++i) {
|
for (int i = 0; i < arr.size(); ++i) {
|
||||||
m_tags << arr[i].toString();
|
m_tags << arr[i].toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ void LegacyNotebookUtils::removeFolderConfigFile(const QString &p_folderPath)
|
|||||||
void LegacyNotebookUtils::forEachFolder(const QJsonObject &p_config, std::function<void(const QString &p_name)> p_func)
|
void LegacyNotebookUtils::forEachFolder(const QJsonObject &p_config, std::function<void(const QString &p_name)> p_func)
|
||||||
{
|
{
|
||||||
auto folderArray = p_config.value(QStringLiteral("sub_directories")).toArray();
|
auto folderArray = p_config.value(QStringLiteral("sub_directories")).toArray();
|
||||||
for (size_t i = 0; i < folderArray.size(); ++i) {
|
for (int i = 0; i < folderArray.size(); ++i) {
|
||||||
const auto name = folderArray[i].toObject().value(QStringLiteral("name")).toString();
|
const auto name = folderArray[i].toObject().value(QStringLiteral("name")).toString();
|
||||||
p_func(name);
|
p_func(name);
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ void LegacyNotebookUtils::forEachFolder(const QJsonObject &p_config, std::functi
|
|||||||
void LegacyNotebookUtils::forEachFile(const QJsonObject &p_config, std::function<void(const LegacyNotebookUtils::FileInfo &p_info)> p_func)
|
void LegacyNotebookUtils::forEachFile(const QJsonObject &p_config, std::function<void(const LegacyNotebookUtils::FileInfo &p_info)> p_func)
|
||||||
{
|
{
|
||||||
auto fileArray = p_config.value(QStringLiteral("files")).toArray();
|
auto fileArray = p_config.value(QStringLiteral("files")).toArray();
|
||||||
for (size_t i = 0; i < fileArray.size(); ++i) {
|
for (int i = 0; i < fileArray.size(); ++i) {
|
||||||
const auto obj = fileArray[i].toObject();
|
const auto obj = fileArray[i].toObject();
|
||||||
FileInfo info;
|
FileInfo info;
|
||||||
info.m_name = obj.value(QStringLiteral("name")).toString();
|
info.m_name = obj.value(QStringLiteral("name")).toString();
|
||||||
@ -89,7 +89,7 @@ void LegacyNotebookUtils::forEachFile(const QJsonObject &p_config, std::function
|
|||||||
info.m_attachmentFolder = obj.value(QStringLiteral("attachment_folder")).toString();
|
info.m_attachmentFolder = obj.value(QStringLiteral("attachment_folder")).toString();
|
||||||
{
|
{
|
||||||
auto arr = obj.value(QStringLiteral("tags")).toArray();
|
auto arr = obj.value(QStringLiteral("tags")).toArray();
|
||||||
for (size_t i = 0; i < arr.size(); ++i) {
|
for (int i = 0; i < arr.size(); ++i) {
|
||||||
info.m_tags << arr[i].toString();
|
info.m_tags << arr[i].toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include <vtextedit/markdowneditorconfig.h>
|
#include <vtextedit/markdowneditorconfig.h>
|
||||||
#include <vtextedit/previewmgr.h>
|
#include <vtextedit/previewmgr.h>
|
||||||
@ -74,8 +75,13 @@ MarkdownEditor::MarkdownEditor(const MarkdownEditorConfig &p_config,
|
|||||||
// TODO: insert heading sequence.
|
// TODO: insert heading sequence.
|
||||||
updateHeadings(p_headerRegions);
|
updateHeadings(p_headerRegions);
|
||||||
});
|
});
|
||||||
connect(m_textEdit, &vte::VTextEdit::cursorLineChanged,
|
|
||||||
|
m_headingTimer = new QTimer(this);
|
||||||
|
m_headingTimer->setInterval(500);
|
||||||
|
connect(m_headingTimer, &QTimer::timeout,
|
||||||
this, &MarkdownEditor::currentHeadingChanged);
|
this, &MarkdownEditor::currentHeadingChanged);
|
||||||
|
connect(m_textEdit, &vte::VTextEdit::cursorLineChanged,
|
||||||
|
m_headingTimer, QOverload<void>::of(&QTimer::start));
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkdownEditor::~MarkdownEditor()
|
MarkdownEditor::~MarkdownEditor()
|
||||||
|
@ -163,6 +163,8 @@ namespace vnotex
|
|||||||
|
|
||||||
// TimeStamp used as sequence number to interact with Web side.
|
// TimeStamp used as sequence number to interact with Web side.
|
||||||
TimeStamp m_timeStamp = 0;
|
TimeStamp m_timeStamp = 0;
|
||||||
|
|
||||||
|
QTimer *m_headingTimer = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user