diff --git a/protoDebuger/ProtoDebug.qml b/protoDebuger/ProtoDebug.qml index b38ec5f..4a90d3f 100644 --- a/protoDebuger/ProtoDebug.qml +++ b/protoDebuger/ProtoDebug.qml @@ -85,7 +85,7 @@ Item { id: lua_script focus: true text: lua_script_text - font.pixelSize: 15 + font.pixelSize: 20 color: "red" selectByMouse : true wrapMode: TextEdit.Wrap @@ -97,7 +97,7 @@ Item { id: text_output Layout.preferredHeight: parent.height - 100 text: qsTr("") - font.pixelSize: 17 + font.pixelSize: 20 Layout.columnSpan: 1 Layout.preferredWidth: parent.width/2 - 20 background: Rectangle { diff --git a/protoDebuger/lua_wraper.cpp b/protoDebuger/lua_wraper.cpp index 57775d4..cca0701 100644 --- a/protoDebuger/lua_wraper.cpp +++ b/protoDebuger/lua_wraper.cpp @@ -15,7 +15,6 @@ int LuaDelegate::DoString(QString scr) return -1; } } - return 0; } diff --git a/protoDebuger/sharedata.cpp b/protoDebuger/sharedata.cpp index 6794655..0a7997f 100644 --- a/protoDebuger/sharedata.cpp +++ b/protoDebuger/sharedata.cpp @@ -79,7 +79,6 @@ int ShareData::openUart(QString port, QString baudRate, QString dataBits, QStrin return -1; } - int ShareData::closeSerial() { if(mSerialController->CloseSerial() == 0){ @@ -115,6 +114,7 @@ int ShareData::updateLuaScript(QString str) return -1; } mLuaStatus = true; + return 0; } int ShareData::saveLuaScript(QString s) @@ -124,7 +124,7 @@ int ShareData::saveLuaScript(QString s) { //-----将数据写入文件 qint64 LineLen = file.write(s.toStdString().c_str(), s.size()); - if (LineLen > 0) + if (LineLen <= 0) { return -1; }