Skip to content

Commit

Permalink
Fix support for qt5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
SKiars committed Jul 22, 2019
1 parent d84cadc commit 564ff18
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion SerialTool/SerialTool.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#-------------------------------------------------
QT += core gui widgets serialport network charts script uitools

TARGET = SerialTool_pre
TARGET = SerialTool

TEMPLATE = app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ScriptExtensionView::ScriptExtensionView(const QString &fileName, QWidget *paren
{
QFile file(fileName);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
loadUi(fileName.chopped(3) + ".ui");
loadUi(fileName.left(fileName.size() - 3) + ".ui");
QScriptValue scriptObj = m_script->newQObject(this);
m_script->globalObject().setProperty("view", scriptObj);
m_script->evaluate(file.readAll());
Expand Down
3 changes: 2 additions & 1 deletion SerialTool/src/views/terminal/qvterminal/qvterminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <QScrollBar>
#include <QApplication>
#include <QClipboard>
#include <QAction>
#include <QDebug>
#include <QMenu>

Expand All @@ -27,7 +28,7 @@ QVTerminal::QVTerminal(QWidget *parent)

_layout = new QVTLayout();

_pasteAction = new QAction("Paste");
_pasteAction = new QAction("Paste", this);
_pasteAction->setShortcut(QKeySequence("Ctrl+V"));
connect(_pasteAction, &QAction::triggered, this, &QVTerminal::paste);
addAction(_pasteAction);
Expand Down
16 changes: 0 additions & 16 deletions SerialTool/src/views/terminal/qvterminal/qvterminal.pri

This file was deleted.

4 changes: 2 additions & 2 deletions SerialTool/src/views/texttr/textedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ void TextEdit::setFonts(QString fonts, int size, QColor color, QString style)
if (style.indexOf("bold") != -1) { // 粗体字
SendScintilla(SCI_STYLESETBOLD, 0, true);
} else {
SendScintilla(SCI_STYLESETBOLD, 0, false);
SendScintilla(SCI_STYLESETBOLD, 0, static_cast<long>(false));
}
if (style.indexOf("italic") != -1) { // 斜体字
SendScintilla(SCI_STYLESETITALIC, 0, true);
} else {
SendScintilla(SCI_STYLESETITALIC, 0, false);
SendScintilla(SCI_STYLESETITALIC, 0, static_cast<long>(false));
}
SendScintilla(SCI_STYLECLEARALL); // 设置全局风格

Expand Down

0 comments on commit 564ff18

Please sign in to comment.