Kandrashin Denis 13 rokov pred
rodič
commit
8302cdcf11
2 zmenil súbory, kde vykonal 53 pridanie a 35 odobranie
  1. 51 34
      source/fb2edit.pro
  2. 2 1
      source/fb2view.cpp

+ 51 - 34
source/fb2edit.pro

@@ -1,34 +1,51 @@
-HEADERS = \
-    fb2app.h \
-    fb2main.h \
-    fb2read.h \
-    fb2tree.h \
-    fb2view.h \
-    fb2xml.h \
-    fb2save.h
-
-SOURCES = \
-    fb2app.cpp \
-    fb2main.cpp \
-    fb2read.cpp \
-    fb2tree.cpp \
-    fb2view.cpp \
-    fb2xml.cpp \
-    fb2save.cpp
-
-RESOURCES = \
-    res/fb2edit.qrc
-
-TARGET = fb2edit
-
-TRANSLATIONS = res/ts/ru.ts
-
-VERSION = 0.01.1
-
-QT += xml
-QT += webkit
-QT += network
-
-LIBS += -lqscintilla2
-
-OTHER_FILES += res/style.css
+HEADERS = \
+    fb2app.h \
+    fb2main.h \
+    fb2read.h \
+    fb2tree.h \
+    fb2save.h \
+    fb2view.h \
+    fb2xml.h \
+    fb2xml2.h
+
+SOURCES = \
+    fb2app.cpp \
+    fb2main.cpp \
+    fb2read.cpp \
+    fb2tree.cpp \
+    fb2save.cpp \
+    fb2view.cpp \
+    fb2xml.cpp \
+    fb2xml2.cpp
+
+RESOURCES = \
+    res/fb2edit.qrc
+
+TARGET = fb2edit
+
+TRANSLATIONS = res/ts/ru.ts
+
+VERSION = 0.01.1
+
+QT += xml
+QT += webkit
+QT += network
+
+LIBS += -lqscintilla2
+
+OTHER_FILES += res/style.css
+
+if (win32) {
+
+    INCLUDEPATH += ../libxml2/include
+    LIBS += -L../libxml2/lib -llibxml2
+
+    INCLUDEPATH += ../iconv/include
+    LIBS += -L../iconv/lib -liconv
+
+} else {
+
+    INCLUDEPATH += /usr/include/libxml2
+    LIBS += -lxml2
+
+}

+ 2 - 1
source/fb2view.cpp

@@ -1,6 +1,7 @@
 #include "fb2view.h"
 #include "fb2read.h"
 #include "fb2save.h"
+#include "fb2xml2.h"
 
 #include <QAction>
 #include <QtDebug>
@@ -110,7 +111,7 @@ bool Fb2WebView::save(QIODevice &device)
     Fb2SaveHandler handler(*this, device);
     QXmlInputSource source;
     source.setData(toBodyXml());
-    QXmlSimpleReader reader;
+    LibXml2Reader reader;
     reader.setContentHandler(&handler);
     reader.setErrorHandler(&handler);
     return reader.parse(source);