Changeset View
Changeset View
Standalone View
Standalone View
shell/shell.cpp
Show First 20 Lines • Show All 675 Lines • ▼ Show 20 Line(s) | 675 | if( part->openUrl(url) ) | |||
---|---|---|---|---|---|
676 | m_recent->addUrl( url ); | 676 | m_recent->addUrl( url ); | ||
677 | else | 677 | else | ||
678 | setActiveTab( previousActiveTab ); | 678 | setActiveTab( previousActiveTab ); | ||
679 | } | 679 | } | ||
680 | 680 | | |||
681 | void Shell::applyOptionsToPart( QObject* part, const QString &serializedOptions ) | 681 | void Shell::applyOptionsToPart( QObject* part, const QString &serializedOptions ) | ||
682 | { | 682 | { | ||
683 | KDocumentViewer* const doc = qobject_cast<KDocumentViewer*>(part); | 683 | KDocumentViewer* const doc = qobject_cast<KDocumentViewer*>(part); | ||
684 | const QString find = ShellUtils::find(serializedOptions); | ||||
aacid: the fromBase64 should be in ShellUtils itself, the serialization/unserialization is what that… | |||||
684 | if ( ShellUtils::startInPresentation(serializedOptions) ) | 685 | if ( ShellUtils::startInPresentation(serializedOptions) ) | ||
685 | doc->startPresentation(); | 686 | doc->startPresentation(); | ||
686 | if ( ShellUtils::showPrintDialog(serializedOptions) ) | 687 | if ( ShellUtils::showPrintDialog(serializedOptions) ) | ||
687 | QMetaObject::invokeMethod( part, "enableStartWithPrint" ); | 688 | QMetaObject::invokeMethod( part, "enableStartWithPrint" ); | ||
688 | if ( ShellUtils::showPrintDialogAndExit(serializedOptions) ) | 689 | if ( ShellUtils::showPrintDialogAndExit(serializedOptions) ) | ||
689 | QMetaObject::invokeMethod( part, "enableExitAfterPrint" ); | 690 | QMetaObject::invokeMethod( part, "enableExitAfterPrint" ); | ||
691 | if(!find.isEmpty()) | ||||
692 | QMetaObject::invokeMethod( part, "enableStartWithFind", Q_ARG( const QString &, find )); | ||||
690 | } | 693 | } | ||
691 | 694 | | |||
692 | void Shell::connectPart( QObject* part ) | 695 | void Shell::connectPart( QObject* part ) | ||
693 | { | 696 | { | ||
694 | connect( this, SIGNAL(moveSplitter(int)), part, SLOT(moveSplitter(int)) ); | 697 | connect( this, SIGNAL(moveSplitter(int)), part, SLOT(moveSplitter(int)) ); | ||
695 | connect( part, SIGNAL(enablePrintAction(bool)), this, SLOT(setPrintEnabled(bool))); | 698 | connect( part, SIGNAL(enablePrintAction(bool)), this, SLOT(setPrintEnabled(bool))); | ||
696 | connect( part, SIGNAL(enableCloseAction(bool)), this, SLOT(setCloseEnabled(bool))); | 699 | connect( part, SIGNAL(enableCloseAction(bool)), this, SLOT(setCloseEnabled(bool))); | ||
697 | connect( part, SIGNAL(mimeTypeChanged(QMimeType)), this, SLOT(setTabIcon(QMimeType))); | 700 | connect( part, SIGNAL(mimeTypeChanged(QMimeType)), this, SLOT(setTabIcon(QMimeType))); | ||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |
the fromBase64 should be in ShellUtils itself, the serialization/unserialization is what that "class" does, should not leak outside.