khtml_no_find_3.5.patch

来自「konqueror3 embedded版本, KDE环境下的当家浏览器的嵌入式版」· PATCH 代码 · 共 302 行

PATCH
302
字号
--- khtml_part.cpp.orig	2005-11-23 11:03:34.000000000 +0100+++ khtml_part.cpp	2005-11-30 12:19:35.000000000 +0100@@ -270,6 +270,7 @@ void KHTMLPart::init( KHTMLView *view, G   d->m_paDebugDOMTree = new KAction( i18n( "Print DOM Tree to STDOUT" ), 0, this, SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" );   d->m_paStopAnimations = new KAction( i18n( "Stop Animated Images" ), 0, this, SLOT( slotStopAnimations() ), actionCollection(), "stopAnimations" ); +#ifndef KONQ_EMBEDDED   d->m_paSetEncoding = new KActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" );   d->m_paSetEncoding->setDelayed( false ); @@ -303,6 +304,7 @@ void KHTMLPart::init( KHTMLView *view, G   d->m_manualDetection->setItems( encodings );   d->m_manualDetection->setCurrentItem( -1 );   d->m_paSetEncoding->insert( d->m_manualDetection );+#endif     KConfig *config = KGlobal::config();@@ -346,8 +348,10 @@ void KHTMLPart::init( KHTMLView *view, G       language = khtml::Decoder::SemiautomaticDetection;      int _id = config->readNumEntry( "AutomaticDetectionLanguage", language );+#ifndef KONQ_EMBEDDED     d->m_automaticDetection->setItemChecked( _id, true );     d->m_paSetEncoding->popupMenu()->setItemChecked( 0, true );+#endif      d->m_autoDetectLanguage = static_cast< khtml::Decoder::AutoDetectLanguage >( _id );   }@@ -753,6 +757,7 @@ bool KHTMLPart::openURL( const KURL &url    d->m_jobspeed = 0; +#ifndef KONQ_EMBEDDED   // If this was an explicit reload and the user style sheet should be used,   // do a stat to see whether the stylesheet was changed in the meanwhile.   if ( args.reload && !settings()->userStyleSheet().isEmpty() ) {@@ -761,6 +766,7 @@ bool KHTMLPart::openURL( const KURL &url     connect( job, SIGNAL( result( KIO::Job * ) ),              this, SLOT( slotUserSheetStatDone( KIO::Job * ) ) );   }+#endif // KONQ_EMBEDDED   emit started( 0L );    return true;@@ -1063,6 +1069,7 @@ QVariant KHTMLPart::crossFrameExecuteScr //#define KJS_VERBOSE  KJSErrorDlg *KHTMLPart::jsErrorExtension() {+#ifndef KONQ_EMBEDDED   if (!d->m_settings->jsErrorsEnabled()) {     return 0L;   }@@ -1091,9 +1098,13 @@ KJSErrorDlg *KHTMLPart::jsErrorExtension     }   }   return d->m_jsedlg;+#else // KONQ_EMBEDDED+  return 0;+#endif }  void KHTMLPart::removeJSErrorExtension() {+#ifndef KONQ_EMBEDDED   if (parentPart()) {     parentPart()->removeJSErrorExtension();     return;@@ -1105,9 +1116,11 @@ void KHTMLPart::removeJSErrorExtension()   }   delete d->m_jsedlg;   d->m_jsedlg = 0;+#endif // KONQ_EMBEDDED }  void KHTMLPart::disableJSErrorExtension() {+#ifndef KONQ_EMBEDDED   removeJSErrorExtension();   // These two lines are really kind of hacky, and it sucks to do this inside   // KHTML but I don't know of anything that's reasonably easy as an alternative@@ -1115,6 +1128,7 @@ void KHTMLPart::disableJSErrorExtension(   // contact all running "KHTML" instance as opposed to Konqueror instances too.   d->m_settings->setJSErrorsEnabled(false);   DCOPClient::mainClient()->send("konqueror*", "KonquerorIface", "reparseConfiguration()", QByteArray());+#endif // KONQ_EMBEDDED }  void KHTMLPart::jsErrorDialogContextMenu() {@@ -1520,6 +1534,7 @@ void KHTMLPart::slotInfoMessage(KIO::Job  void KHTMLPart::setPageSecurity( PageSecurity sec ) {+#ifndef KONQ_EMBEDDED   emit d->m_extension->setPageSecurity( sec );   if ( sec != NotCrypted && !d->m_statusBarIconLabel && !parentPart() ) {     d->m_statusBarIconLabel = new KURLLabel( d->m_statusBarExtension->statusBar() );@@ -1559,6 +1574,7 @@ void KHTMLPart::setPageSecurity( PageSec   d->m_paSecurity->setIcon( iconName );   if ( d->m_statusBarIconLabel )     d->m_statusBarIconLabel->setPixmap( SmallIcon( iconName, instance() ) );+#endif // KONQ_EMBEDDED }  void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )@@ -2145,6 +2161,7 @@ void KHTMLPart::slotJobDone( KIO::Job* /  void KHTMLPart::slotUserSheetStatDone( KIO::Job *_job ) {+#ifndef KONQ_EMBEDDED   using namespace KIO;    if ( _job->error() ) {@@ -2172,6 +2189,7 @@ void KHTMLPart::slotUserSheetStatDone( K   }    setUserStyleSheet( KURL( settings()->userStyleSheet() ) );+#endif //KONQ_EMBEDDED }  void KHTMLPart::checkCompleted()@@ -2960,14 +2978,17 @@ void KHTMLPart::enableFindAheadActions(   void KHTMLPart::slotFindDialogDestroyed() {+#ifndef KONQ_EMBEDDED   d->m_lastFindState.options = d->m_findDialog->options();   d->m_lastFindState.history = d->m_findDialog->findHistory();   d->m_findDialog->deleteLater();   d->m_findDialog = 0L;+#endif // KONQ_EMBEDDED }  void KHTMLPart::findText() {+#ifndef KONQ_EMBEDDED   // First do some init to make sure we can search in this frame   if ( !d->m_doc )     return;@@ -3003,8 +3024,10 @@ void KHTMLPart::findText()   connect( d->m_findDialog, SIGNAL(finished()), this, SLOT(slotFindDialogDestroyed()) );    findText( d->m_findDialog->pattern(), 0 /*options*/, widget(), d->m_findDialog );+#endif // KONQ_EMBEDDED } +#ifndef KONQ_EMBEDDED void KHTMLPart::findText( const QString &str, long options, QWidget *parent, KFindDialog *findDialog ) {   // First do some init to make sure we can search in this frame@@ -3032,6 +3055,7 @@ void KHTMLPart::findText( const QString                    options & KFindDialog::FromCursor );   } }+#endif // KONQ_EMBEDDED  bool KHTMLPart::findTextNext() {@@ -3041,6 +3065,7 @@ bool KHTMLPart::findTextNext() // New method bool KHTMLPart::findTextNext( bool reverse ) {+#ifndef KONQ_EMBEDDED   if (!d->m_find)   {     // We didn't show the find dialog yet, let's do it then (#49442)@@ -3262,6 +3287,9 @@ bool KHTMLPart::findTextNext( bool rever   }    return res == KFind::Match;+#else+  return false;+#endif // KONQ_EMBEDDED }  void KHTMLPart::slotHighlight( const QString& /*text*/, int index, int length )@@ -3396,6 +3424,7 @@ void KHTMLPart::slotHighlight( const QSt   }   emitSelectionChanged(); +#ifndef KONQ_EMBEDDED   // make the finddialog move away from the selected area   if ( d->m_findDialog && !highlightedRect.isNull() )   {@@ -3403,6 +3432,7 @@ void KHTMLPart::slotHighlight( const QSt     //kdDebug(6050) << "avoiding " << highlightedRect << endl;     KDialog::avoidArea( d->m_findDialog, highlightedRect );   }+#endif // KONQ_EMBEDDED }  QString KHTMLPart::selectedTextAsHTML() const@@ -3986,6 +4016,7 @@ bool KHTMLPart::urlSelectedIntern( const  void KHTMLPart::slotViewDocumentSource() {+#ifndef KONQ_EMBEDDED   KURL url(m_url);   bool isTempFile = false;   if (!(url.isLocalFile()) && KHTMLPageCache::self()->isComplete(d->m_cacheId))@@ -4001,10 +4032,12 @@ void KHTMLPart::slotViewDocumentSource()   }    (void) KRun::runURL( url, QString::fromLatin1("text/plain"), isTempFile );+#endif //KONQ_EMBEDDED }  void KHTMLPart::slotViewPageInfo() {+#ifndef KONQ_EMBEDDED   KHTMLInfoDlg *dlg = new KHTMLInfoDlg(NULL, "KHTML Page Info Dialog", false, WDestructiveClose);   dlg->_close->setGuiItem(KStdGuiItem::close()); @@ -4053,11 +4086,13 @@ void KHTMLPart::slotViewPageInfo()    dlg->show();   /* put no code here */+#endif // KONQ_EMBEDDED }   void KHTMLPart::slotViewFrameSource() {+#ifndef KONQ_EMBEDDED   KParts::ReadOnlyPart *frame = currentFrame();   if ( !frame )     return;@@ -4082,6 +4117,7 @@ void KHTMLPart::slotViewFrameSource()   }    (void) KRun::runURL( url, QString::fromLatin1("text/plain"), isTempFile );+#endif // KONQ_EMBEDDED }  KURL KHTMLPart::backgroundURL() const@@ -4417,6 +4453,7 @@ bool KHTMLPart::processObjectRequest( kh     // However we don't want to ask for flash and other plugin things..     if ( child->m_type != khtml::ChildFrame::Object )     {+#ifndef KONQ_EMBEDDED       QString suggestedFilename;       if ( child->m_run )         suggestedFilename = child->m_run->suggestedFilename();@@ -4434,6 +4471,7 @@ bool KHTMLPart::processObjectRequest( kh       default: // Open         break;       }+#endif     }      QStringList dummy; // the list of servicetypes handled by the part is now unused.@@ -4655,9 +4693,11 @@ KParts::ReadOnlyPart *KHTMLPart::createP         return res;       }     } else {+#ifndef KONQ_EMBEDDED       // TODO KMessageBox::error and i18n, like in KonqFactory::createView?       kdWarning() << QString("There was an error loading the module %1.\nThe diagnostics is:\n%2")                       .arg(service->name()).arg(KLibLoader::self()->lastErrorMessage()) << endl;+#endif // KONQ_EMBEDDED     }   }   return 0;@@ -5614,8 +5654,10 @@ DOM::Node KHTMLPart::nonSharedNodeUnderM void KHTMLPart::emitSelectionChanged() {   emit d->m_extension->enableAction( "copy", hasSelection() );+#ifndef KONQ_EMBEDDED   if ( d->m_findDialog )        d->m_findDialog->setHasSelection( hasSelection() );+#endif // KONQ_EMBEDDED    emit d->m_extension->selectionInfo( selectedText() );   emit selectionChanged();@@ -6081,8 +6123,10 @@ void KHTMLPart::khtmlMousePressEvent( kh     d->m_bRightMousePressed = true;   } else if ( _mouse->button() == RightButton )   {+#ifndef KONQ_EMBEDDED     popupMenu( d->m_strSelectedURL );     // might be deleted, don't touch "this"+#endif // KONQ_EMBEDDED   } } @@ -7054,13 +7098,17 @@ void KHTMLPart::slotAutomaticDetectionLa       d->m_automaticDetection->setItemChecked( i, false );   } +#ifndef KONQ_EMBEDDED   d->m_paSetEncoding->popupMenu()->setItemChecked( 0, true );+#endif // KONQ_EMBEDDED    setEncoding( QString::null, false ); +#ifndef KONQ_EMBEDDED   if( d->m_manualDetection )     d->m_manualDetection->setCurrentItem( -1 );   d->m_paSetEncoding->popupMenu()->setItemChecked( d->m_paSetEncoding->popupMenu()->idAt( 2 ), false );+#endif // KONQ_EMBEDDED }  khtml::Decoder *KHTMLPart::createDecoder()

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?