soliduiserver uses the same method - instead of piping it sets the key to
stdin and writes the password to it, bonus points for simplifying the
internal command runner (ExternalCommand class) aswell
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
note that it is not checked for by okular itself, it's just being parsed
and stored in memory by anything using KService and such
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
if you are not doing full rebuild (to catch API changes) atleast on
every new release then you are doing something wrong anyway
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
once upon a time kdeinit used to call kdemain() function, with it rewritten
by me its hacks are in the past
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
ark is not unique application, i.e. it uses KApplicaiton and provides
org.kde.ark-<pid> D-Bus interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
QTextCodec::codecForUtfText() can detect only unicode signatures (on
purpose) while QTextCodec::codecForText() can detect more
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KUrl has QVariant operator meaning it should be QVariant from QVariant
(i.e. copy constructor) but the testModel() function (see the history model
test) explicitly converts it to KUrl while the StartMainPage class was
converting it to QUrl (via QVariant::toUrl()).
qVariantFromValue<T>() has type before QVariant specialization
side note, try compiling the following (with proper Makefile):
#include <qurl.h>
#include <qvariant.h>
#include <qdebug.h>
#include <kurl.h>
int main (int argc, char** argv)
{
QVariant v(QUrl());
qDebug() << v.type() << v.userType();
QVariant v2(KUrl());
qDebug() << v2.type() << v2.userType();
return 0;
}
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
also the loaded state does not have to be tracked and a new attempt to load
it (in case of temporary resource failure) may succeed (failures are
neither tracked nor reported by the video widget class)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this is just pre-face to (maybe) use poster image instead of custom one for
videos in the epub generator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KIO::PreviewJob was made for this kind of things, it also does not involve
loading the file (which may play a sound even if the widget is not
visible), seeking, pausing and then grabbing a QWidget snapshot. the only
requirement is for ffmpegthumbs thumbnailer to be installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
that KIcon("kget").paint() in ProxyWidget::paint() looks expensive.. may
have to cache the KIcon object aswell and update it when the system icon
theme changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
fixes regression since the port to KAudioPlayer, the use of qBound() is
there to make sure speakers (or head-phones) do not blow up while the
assert is for developers to know that Okular generator is trying to use
value outside the range
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>