mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #25: Remove pro/qbs, fix MSVC build
This commit is contained in:
@@ -1,114 +0,0 @@
|
||||
# Copyright (C) 2018-2022 Jakub Melka
|
||||
#
|
||||
# This file is part of PDF4QT.
|
||||
#
|
||||
# PDF4QT is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# with the written consent of the copyright owner, any later version.
|
||||
#
|
||||
# PDF4QT is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
QT += core gui widgets winextras printsupport texttospeech network xml
|
||||
|
||||
TARGET = Pdf4QtViewer
|
||||
TEMPLATE = lib
|
||||
|
||||
include(../Pdf4Qt.pri)
|
||||
|
||||
DEFINES += PDF4QTVIEWER_LIBRARY
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "PDF viewer support library"
|
||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
win32-*g++|unix: {
|
||||
LIBS += -ltbb
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
LIBS += -L$$OUT_PWD/..
|
||||
LIBS += -lPDF4QtLib
|
||||
|
||||
SOURCES += \
|
||||
pdfaboutdialog.cpp \
|
||||
pdfadvancedfindwidget.cpp \
|
||||
pdfdocumentpropertiesdialog.cpp \
|
||||
pdfencryptionsettingsdialog.cpp \
|
||||
pdfencryptionstrengthhintwidget.cpp \
|
||||
pdfoptimizedocumentdialog.cpp \
|
||||
pdfprogramcontroller.cpp \
|
||||
pdfrecentfilemanager.cpp \
|
||||
pdfrendertoimagesdialog.cpp \
|
||||
pdfsendmail.cpp \
|
||||
pdfsidebarwidget.cpp \
|
||||
pdftexttospeech.cpp \
|
||||
pdfundoredomanager.cpp \
|
||||
pdfviewermainwindow.cpp \
|
||||
pdfviewermainwindowlite.cpp \
|
||||
pdfviewersettings.cpp \
|
||||
pdfviewersettingsdialog.cpp
|
||||
|
||||
HEADERS += \
|
||||
pdfaboutdialog.h \
|
||||
pdfadvancedfindwidget.h \
|
||||
pdfdocumentpropertiesdialog.h \
|
||||
pdfencryptionsettingsdialog.h \
|
||||
pdfencryptionstrengthhintwidget.h \
|
||||
pdfoptimizedocumentdialog.h \
|
||||
pdfprogramcontroller.h \
|
||||
pdfrecentfilemanager.h \
|
||||
pdfrendertoimagesdialog.h \
|
||||
pdfsendmail.h \
|
||||
pdfsidebarwidget.h \
|
||||
pdftexttospeech.h \
|
||||
pdfundoredomanager.h \
|
||||
pdfviewerglobal.h \
|
||||
pdfviewermainwindow.h \
|
||||
pdfviewermainwindowlite.h \
|
||||
pdfviewersettings.h \
|
||||
pdfviewersettingsdialog.h
|
||||
|
||||
FORMS += \
|
||||
pdfaboutdialog.ui \
|
||||
pdfadvancedfindwidget.ui \
|
||||
pdfdocumentpropertiesdialog.ui \
|
||||
pdfencryptionsettingsdialog.ui \
|
||||
pdfoptimizedocumentdialog.ui \
|
||||
pdfrendertoimagesdialog.ui \
|
||||
pdfsidebarwidget.ui \
|
||||
pdfviewermainwindow.ui \
|
||||
pdfviewermainwindowlite.ui \
|
||||
pdfviewersettingsdialog.ui
|
||||
|
||||
CONFIG += force_debug_info
|
||||
|
||||
viewer_library.files = $$DESTDIR/Pdf4QtViewer.dll
|
||||
viewer_library.path = $$DESTDIR/install
|
||||
viewer_library.CONFIG += no_check_exist
|
||||
INSTALLS += viewer_library
|
||||
|
||||
plugins.files = $$DESTDIR/pdfplugins/ObjectInspectorPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/OutputPreviewPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/DimensionsPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/SoftProofingPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/RedactPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/AudioBookPlugin.dll \
|
||||
$$DESTDIR/pdfplugins/SignaturePlugin.dll
|
||||
|
||||
plugins.path = $$DESTDIR/install/pdfplugins
|
||||
plugins.CONFIG += no_check_exist
|
||||
INSTALLS += plugins
|
||||
|
||||
RESOURCES += \
|
||||
pdf4qtviewer.qrc
|
||||
|
||||
DEFINES += QT_INSTALL_DIRECTORY=\"\\\"$$[QT_INSTALL_BINS]\\\"\"
|
@@ -1,30 +0,0 @@
|
||||
import qbs.Utilities
|
||||
|
||||
Pdf4QtLibrary {
|
||||
name: "Pdf4QtViewer"
|
||||
files: [
|
||||
"*.h",
|
||||
"*.cpp",
|
||||
"*.ui",
|
||||
"pdf4qtviewer.qrc",
|
||||
]
|
||||
cpp.includePaths: ["."]
|
||||
Properties {
|
||||
condition: qbs.hostOS.contains("windows")
|
||||
cpp.defines: ["PDF4QTVIEWER_LIBRARY", "QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
|
||||
}
|
||||
Properties {
|
||||
condition: qbs.hostOS.contains("linux")
|
||||
cpp.defines: ["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
|
||||
}
|
||||
cpp.defines: base.concat(["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)])
|
||||
Depends { name: "Qt"; submodules: ["printsupport", "texttospeech", "network", "xml"] }
|
||||
Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
|
||||
Depends { name: "Pdf4QtLib" }
|
||||
Export {
|
||||
Depends { name: "cpp" }
|
||||
cpp.includePaths: ["."]
|
||||
Depends { name: "Pdf4QtLib" }
|
||||
Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
|
||||
}
|
||||
}
|
@@ -130,7 +130,7 @@ void PDFDocumentPropertiesDialog::initializeProperties(const pdf::PDFDocument* d
|
||||
{
|
||||
QString key = QString::fromLatin1(item.first);
|
||||
QVariant valueVariant = item.second;
|
||||
QString value = (valueVariant.typeId() == QVariant::DateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
|
||||
QString value = (valueVariant.typeId() == QMetaType::QDateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
|
||||
new QTreeWidgetItem(customRoot, { key, value });
|
||||
}
|
||||
ui->propertiesTreeWidget->addTopLevelItem(customRoot);
|
||||
|
@@ -97,7 +97,7 @@ void PDFRecentFileManager::onRecentFileActionTriggered()
|
||||
Q_ASSERT(action);
|
||||
|
||||
QVariant data = action->data();
|
||||
if (data.typeId() == QVariant::String)
|
||||
if (data.typeId() == QMetaType::QString)
|
||||
{
|
||||
emit fileOpenRequest(data.toString());
|
||||
}
|
||||
|
@@ -811,9 +811,9 @@ void PDFViewerSettingsDialog::setSpeechEngine(const QString& engine, const QStri
|
||||
QVector<QLocale> locales = textToSpeech.availableLocales();
|
||||
ui->speechLocaleComboBox->setUpdatesEnabled(false);
|
||||
ui->speechLocaleComboBox->clear();
|
||||
for (const QLocale& locale : locales)
|
||||
for (const QLocale& currentLocale : locales)
|
||||
{
|
||||
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeCountryName()), locale.name());
|
||||
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(currentLocale.nativeLanguageName(), currentLocale.nativeCountryName()), currentLocale.name());
|
||||
}
|
||||
ui->speechLocaleComboBox->setUpdatesEnabled(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user