Skip to content

Commit

Permalink
Overhaul PDF Model code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GravisZro committed Sep 17, 2023
1 parent b2b2306 commit d8a45b8
Show file tree
Hide file tree
Showing 25 changed files with 145 additions and 533 deletions.
13 changes: 10 additions & 3 deletions src/autotest/autotest.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
QT += testlib xml
QT += testlib
CONFIG += c++11 strict_c++
CONFIG(release, debug|release):CONFIG += optimize_full

# For Appveyor because it dumps includes in the project root
APPVEYOR_BUILD_FOLDER=$$(APPVEYOR_BUILD_FOLDER)
!isEmpty(APPVEYOR_BUILD_FOLDER) {
INCLUDEPATH += $$APPVEYOR_BUILD_FOLDER
}

CONFIG += optimize_full c++11
CONFIG += qt console warn_on depend_includepath testcase
CONFIG -= app_bundle

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

SOURCES += tst_pdf_extract.cpp

unix:{
unix {
QMAKE_LFLAGS_RPATH=
QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\'"
}
18 changes: 10 additions & 8 deletions src/kicad/kicad.pro
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#-------------------------------------------------
#
# Project created by QtCreator 2014-08-05T17:49:45
#
#-------------------------------------------------
QT += core gui widgets
QT += printsupport
# printer support is for PDF output

QT += gui printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11 strict_c++
CONFIG(release, debug|release):CONFIG += optimize_full

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

TARGET = kicad
TEMPLATE = lib
Expand Down
137 changes: 0 additions & 137 deletions src/pdf_extract/controller/pdfloader.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions src/pdf_extract/controller/pdfloader.h

This file was deleted.

23 changes: 0 additions & 23 deletions src/pdf_extract/controller/pdfpackagesearcher.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions src/pdf_extract/controller/pdfpackagesearcher.h

This file was deleted.

3 changes: 1 addition & 2 deletions src/pdf_extract/datasheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QDomNamedNodeMap>
//#include <QDomNamedNodeMap>
#include <QFile>
#include <QPainter>
#include <QRegularExpression>

#include <poppler/qt5/poppler-form.h>
#include <poppler/qt5/poppler-qt5.h>

using namespace Poppler;
Expand Down
23 changes: 0 additions & 23 deletions src/pdf_extract/model/pdfcomponent.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions src/pdf_extract/model/pdfcomponent.h

This file was deleted.

Loading

0 comments on commit d8a45b8

Please sign in to comment.