summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2014-10-17 06:21:32 (GMT)
committerMontel Laurent <montel@kde.org>2014-10-17 06:21:32 (GMT)
commit8f8b70d893f29a8ac4015a02037deed0375fb660 (patch)
tree7d86e1a349dd65824c654de5bb5abf08978362ec
parent2d8df4584513cba75d5be49748a5fbe59696bd4f (diff)
kdelibs4support--
-rw-r--r--generators/dvi/dviRenderer.cpp14
-rw-r--r--generators/dvi/dviexport.cpp10
-rw-r--r--generators/dvi/psgs.cpp2
3 files changed, 14 insertions, 12 deletions
diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp
index 1475fb4..20c3903 100644
--- a/generators/dvi/dviRenderer.cpp
+++ b/generators/dvi/dviRenderer.cpp
@@ -25,12 +25,10 @@
#include <math.h>
#include <QTime>
#include <kconfig.h>
-#include <kglobal.h>
#include <KLocalizedString>
#include <QMimeType>
#include <QMimeDatabase>
-#include <kstandarddirs.h>
-#include <kvbox.h>
+#include <QVBoxLayout>
#include <QApplication>
#include <QCheckBox>
@@ -280,11 +278,14 @@ void dviRenderer::showThatSourceInformationIsPresent()
KDialogBase dialog(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes,
parentWidget, "information", true, true, KStandardGuiItem::ok());
- KVBox *topcontents = new KVBox (&dialog);
- topcontents->setSpacing(KDialog::spacingHint()*2);
- topcontents->setMargin(KDialog::marginHint()*2);
+ QWidget *topcontents = new QWidget (&dialog);
+ QVBoxLayout *topcontentsVBoxLayout = new QVBoxLayout(topcontents);
+ topcontentsVBoxLayout->setMargin(0);
+ topcontentsVBoxLayout->setSpacing(KDialog::spacingHint()*2);
+ topcontentsVBoxLayout->setMargin(KDialog::marginHint()*2);
QWidget *contents = new QWidget(topcontents);
+ topcontentsVBoxLayout->addWidget(contents);
QHBoxLayout * lay = new QHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint()*2);
@@ -300,6 +301,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
lay->addStretch(1);
QSize extraSize = QSize(50,30);
QCheckBox *checkbox = new QCheckBox(i18n("Do not show this message again"), topcontents);
+ topcontentsVBoxLayout->addWidget(checkbox);
extraSize = QSize(50,0);
dialog.setHelpLinkText(i18n("Explain in more detail..."));
dialog.setHelp("inverse-search", "kdvi");
diff --git a/generators/dvi/dviexport.cpp b/generators/dvi/dviexport.cpp
index 84c7c96..53881f8 100644
--- a/generators/dvi/dviexport.cpp
+++ b/generators/dvi/dviexport.cpp
@@ -25,19 +25,19 @@
#include "dviRenderer.h"
#include "debug_dvi.h"
-#include <KStandardDirs>
-#include <kfiledialog.h>
+
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <ktemporaryfile.h>
#include <QEventLoop>
#include <QFileInfo>
#include <QLabel>
#include <QtPrintSupport/QPrinter>
+#include <QTemporaryFile>
#include <cassert>
+#include <QStandardPaths>
DVIExport::DVIExport(dviRenderer& parent)
@@ -125,7 +125,7 @@ DVIExportToPDF::DVIExportToPDF(dviRenderer& parent, const QString& output_name)
if (!input.exists() || !input.isReadable())
return;
- if (KStandardDirs::findExe("dvipdfm").isEmpty()) {
+ if (QStandardPaths::findExecutable("dvipdfm").isEmpty()) {
emit error(i18n("<qt><p>Okular could not locate the program <em>dvipdfm</em> on your computer. This program is "
"essential for the export function to work. You can, however, convert "
"the DVI-file to PDF using the print function of Okular, but that will often "
@@ -182,7 +182,7 @@ DVIExportToPS::DVIExportToPS(dviRenderer& parent,
return;
}
- if (KStandardDirs::findExe("dvips").isEmpty()) {
+ if (QStandardPaths::findExecutable("dvips").isEmpty()) {
emit error(i18n("<qt><p>Okular could not locate the program <em>dvips</em> on your computer. "
"That program is essential for the export function to work.</p>"
"<p>Hint to the perplexed system administrator: Okular uses the PATH environment "
diff --git a/generators/dvi/psgs.cpp b/generators/dvi/psgs.cpp
index 7b49cca..0b7d637 100644
--- a/generators/dvi/psgs.cpp
+++ b/generators/dvi/psgs.cpp
@@ -18,7 +18,7 @@
#include <KLocalizedString>
#include <kprocess.h>
-#include <ktemporaryfile.h>
+#include <qtemporaryfile.h>
#include <kurl.h>
#include <QtCore/qloggingcategory.h>