Skip to content

Commit d8a45b8

Browse files
committed
Overhaul PDF Model code
I used re-structured the code to be more OO compliant. However, the main extraction loop was heavily modified to be readable. Some unused files were deleted and removed from the project file. Project file options were unified and updated for Appveyor.
1 parent b2b2306 commit d8a45b8

25 files changed

+145
-533
lines changed

src/autotest/autotest.pro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
QT += testlib xml
1+
QT += testlib
2+
CONFIG += c++11 strict_c++
3+
CONFIG(release, debug|release):CONFIG += optimize_full
4+
5+
# For Appveyor because it dumps includes in the project root
6+
APPVEYOR_BUILD_FOLDER=$$(APPVEYOR_BUILD_FOLDER)
7+
!isEmpty(APPVEYOR_BUILD_FOLDER) {
8+
INCLUDEPATH += $$APPVEYOR_BUILD_FOLDER
9+
}
210

3-
CONFIG += optimize_full c++11
411
CONFIG += qt console warn_on depend_includepath testcase
512
CONFIG -= app_bundle
613

@@ -20,7 +27,7 @@ DEPENDPATH += $$SOURCE_ROOT/kicad $$SOURCE_ROOT/pdf_extract
2027

2128
SOURCES += tst_pdf_extract.cpp
2229

23-
unix:{
30+
unix {
2431
QMAKE_LFLAGS_RPATH=
2532
QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\'"
2633
}

src/kicad/kicad.pro

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
#-------------------------------------------------
2-
#
3-
# Project created by QtCreator 2014-08-05T17:49:45
4-
#
5-
#-------------------------------------------------
1+
QT += core gui widgets
2+
QT += printsupport
3+
# printer support is for PDF output
64

7-
QT += gui printsupport
8-
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
5+
CONFIG += c++11 strict_c++
6+
CONFIG(release, debug|release):CONFIG += optimize_full
97

10-
CONFIG += optimize_full c++11
8+
# For Appveyor because it dumps includes in the project root
9+
APPVEYOR_BUILD_FOLDER=$$(APPVEYOR_BUILD_FOLDER)
10+
!isEmpty(APPVEYOR_BUILD_FOLDER) {
11+
INCLUDEPATH += $$APPVEYOR_BUILD_FOLDER
12+
}
1113

1214
TARGET = kicad
1315
TEMPLATE = lib

src/pdf_extract/controller/pdfloader.cpp

Lines changed: 0 additions & 137 deletions
This file was deleted.

src/pdf_extract/controller/pdfloader.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/pdf_extract/controller/pdfpackagesearcher.cpp

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/pdf_extract/controller/pdfpackagesearcher.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/pdf_extract/datasheet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
#include <QCoreApplication>
2222
#include <QDebug>
2323
#include <QDir>
24-
#include <QDomNamedNodeMap>
24+
//#include <QDomNamedNodeMap>
2525
#include <QFile>
2626
#include <QPainter>
2727
#include <QRegularExpression>
2828

29-
#include <poppler/qt5/poppler-form.h>
3029
#include <poppler/qt5/poppler-qt5.h>
3130

3231
using namespace Poppler;

src/pdf_extract/model/pdfcomponent.cpp

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/pdf_extract/model/pdfcomponent.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)