kdelibs4support--

This commit is contained in:
Montel Laurent 2014-10-17 08:21:32 +02:00
parent 2d8df45845
commit 8f8b70d893
3 changed files with 14 additions and 12 deletions

View file

@ -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");

View file

@ -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 "

View file

@ -18,7 +18,7 @@
#include <KLocalizedString>
#include <kprocess.h>
#include <ktemporaryfile.h>
#include <qtemporaryfile.h>
#include <kurl.h>
#include <QtCore/qloggingcategory.h>