浏览代码

fix build fail on linux

coconil 2 年之前
父节点
当前提交
fcfb3a75a6
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/cceditor/ccnotepad.cpp
  2. 1 1
      src/main.cpp

+ 1 - 1
src/cceditor/ccnotepad.cpp

@@ -8770,7 +8770,7 @@ void CCNotePad::slot_formatXml()
 void CCNotePad::slot_formatJson()
 void CCNotePad::slot_formatJson()
 {
 {
 	ScintillaEditView* _pEditView = getCurEditView();
 	ScintillaEditView* _pEditView = getCurEditView();
-	if (_pEditView == nullptr && _pEditView->isReadOnly())
+	if (_pEditView == nullptr || _pEditView->isReadOnly())
 	{
 	{
 		return;
 		return;
 	}
 	}

+ 1 - 1
src/main.cpp

@@ -31,9 +31,9 @@
 #include <qt_windows.h>
 #include <qt_windows.h>
 const ULONG_PTR CUSTOM_TYPE = 10000;
 const ULONG_PTR CUSTOM_TYPE = 10000;
 const ULONG_PTR OPEN_NOTEPAD_TYPE = 10001;
 const ULONG_PTR OPEN_NOTEPAD_TYPE = 10001;
-bool s_isAdminAuth = false;
 #endif
 #endif
 
 
+bool s_isAdminAuth = false;
 const QString c_strTitle = "Ndd";
 const QString c_strTitle = "Ndd";