[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenox/konq-embed
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2006-03-31 10:58:17
Message-ID: 1143802697.295752.9234.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 524831 by eva:

find next bug:
if the patch is commented out it is no wonder it doesn't work...


 M  +73 -8     dropin/kio/kprotocolmanager.cpp  
 M  +1 -1      dropin/qt2compat/qt3scrollview.cpp  
 M  +3 -6      kdesrc/khtml/patches/khtml_qt2.3.patch  
 M  +1 -1      prepare_kde_src  
 M  +1 -1      src/mainwindow_road.cc  
 M  +2 -1      src/mainwindow_road.h  
 M  +2 -6      src/preferences_road.cc  


--- trunk/kdenox/konq-embed/dropin/kio/kprotocolmanager.cpp #524830:524831
@@ -31,6 +31,11 @@
 
 #include <stdlib.h>
 
+#ifdef _QT_QPE_
+#include <qtopia/config.h>
+#include <qtopia/global.h>
+#endif
+
 // CACHE SETTINGS
 #define DEFAULT_MAX_CACHE_SIZE          5120          //  5 MB
 #define DEFAULT_MAX_CACHE_AGE           60*60*24*14   // 14 DAYS
@@ -45,15 +50,16 @@
 
 #ifdef Q_WS_QWS
 #define DEFAULT_USERAGENT_STRING \
-   QString::fromLatin1("Mozilla/5.0 (compatible; Konqueror/%1; QtEmbedded/%2x%3)") \
+   QString::fromLatin1("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 \
                (like Gecko); QtEmbedded/%2x%3") \
    .arg( KDE_VERSION_STRING ) \
    .arg( qApp->desktop()->width() ) \
    .arg( qApp->desktop()->height() )
 #else
 #define DEFAULT_USERAGENT_STRING \
-   QString::fromLatin1("Mozilla/5.0 (compatible; Konqueror/%1; X11)").arg( \
KDE_VERSION_STRING ) +   QString::fromLatin1("Mozilla/5.0 (compatible; \
Konqueror/%1.%2%3; X11) KHTML/%4.%5.%6 (like Gecko)").arg( KDE_VERSION_STRING )  \
#endif  
+
 QString KProtocolManager::userAgentForHost( const QString &/*host*/ )
 {
     QString agent = QString::fromLatin1( getenv( "HTTP_USER_AGENT" ) );
@@ -71,18 +77,33 @@
 
 QString KProtocolManager::httpProxy()
 {
-    KConfig *config = KGlobal::config();
-    KConfigGroupSaver saver( config, QString::fromLatin1( "Network Settings" ) );
-
-    /*
+#if defined( _QT_QPE_ )
+    Config proxy( Global::applicationFileName("Network", "modules") + \
"/Proxies.conf", Config::File ); +//    proxy.setGroup("Info");
+//    proxy.writeEntry("UserSelectable",0);
+    proxy.setGroup("Properties");
+/*    proxy.writeEntry("type", cfg.readEntry("type") );
+    proxy.writeEntry("autoconfig", cfg.readEntry("autoconfig") );
+    proxy.writeEntry("httphost", cfg.readEntry("httphost") );
+    proxy.writeEntry("httpport", cfg.readEntry("httpport") );
+    proxy.writeEntry("ftphost", cfg.readEntry("ftphost") );
+    proxy.writeEntry("ftpport", cfg.readEntry("ftpport") );
+    proxy.writeEntry("noproxies", cfg.readEntry("noproxies") );
+*/
+    QString res = proxy.readEntry("httphost");
+    return res;
+#elif defined( PROXY_ENV )
     QString res = QString::fromLatin1( getenv( "HTTP_PROXY" ) );
 
     if ( res.isEmpty() )
         res = QString::fromLatin1( getenv( "http_proxy" ) );
 
     return res;
-    */
+#else
+    KConfig *config = KGlobal::config();
+    KConfigGroupSaver saver( config, QString::fromLatin1( "Network Settings" ) );
     return config->readEntry( "HTTPProxyServer" );
+#endif
 }
 
 void KProtocolManager::setHTTPProxy( const QString &server )
@@ -107,6 +128,8 @@
 {
     if ( protocol.left( 4 ) == "http" )
         return httpProxy();
+    else if ( protocol.left( 3 ) == "ftp" )
+        return ftpProxy();
     else
         return QString::null;
 }
@@ -166,12 +189,54 @@
 
     QString group = protocol.lower() + " Settings";
 
+#ifdef _QT_QPE_
+    config->setGroup(group);
+
+// use Qtopia settings (different for each network setup)
+    Config proxy( Global::applicationFileName("Network", "modules") + \
"/Proxies.conf", Config::File ); +
+// this is how Qtopia reads the stuff:
+/*    proxy.setGroup("Info");
+    proxy.writeEntry("UserSelectable",0);
+    proxy.setGroup("Properties");
+    proxy.writeEntry("type", cfg.readEntry("type") );
+    proxy.writeEntry("autoconfig", cfg.readEntry("autoconfig") );
+    proxy.writeEntry("httphost", cfg.readEntry("httphost") );
+    proxy.writeEntry("httpport", cfg.readEntry("httpport") );
+    proxy.writeEntry("ftphost", cfg.readEntry("ftphost") );
+    proxy.writeEntry("ftpport", cfg.readEntry("ftpport") );
+    proxy.writeEntry("noproxies", cfg.readEntry("noproxies") );
+*/
+    switch (proxy.readNumEntry("type"))
+    {
+       case 0: // no proxy
+          config->writeEntry( "ProxyType", 0);
+          break;
+
+       case 1: // auto config
+          config->writeEntry( "Proxy Config Script", proxy.readEntry("autoconfig"));
+          config->writeEntry( "ProxyType", 2);
+          break;
+
+       case 2: // manual
+          proxy.setGroup("Properties");
+          if ( protocol.left( 4 ) == "http" )
+             config->writeEntry( "httpProxy", proxy.readEntry("httphost") + ":" + \
proxy.readEntry("httpport") ); +          if ( protocol.left( 3 ) == "ftp" )
+             config->writeEntry( "httpProxy", proxy.readEntry("ftphost") + ":" + \
proxy.readEntry("ftpport") ); +          config->writeEntry( "NoProxyFor", \
proxy.readEntry("noproxies")); +          config->writeEntry( "ProxyType", 1);
+
+      }
+#endif
+
     KConfigGroupSaver saver( config, group );
    
-    res.insert( "UseProxy", proxyFor( protocol ) );                 
+    res.insert( "UseProxy", proxyFor( protocol ) );
 
     res += config->entryMap( group ); 
 
+
     // arghl, temporary hack (need kio::sessiondata, kind of)
     if ( !res.contains( "Cookies" ) )
         res.insert( "Cookies", "true" );
--- trunk/kdenox/konq-embed/dropin/qt2compat/qt3scrollview.cpp #524830:524831
@@ -48,7 +48,7 @@
 #include "qapplication.h"
 #include "qtimer.h"
 #include "qstyle.h"
-#include "qt3mouseevent.h"
+#include "qevent.h"
 #ifdef Q_WS_MAC
 # include "qt_mac.h"
 #endif
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/khtml_qt2.3.patch #524830:524831
@@ -134,20 +134,17 @@
          }
        }
    }
-@@ -3440,11 +3456,13 @@ void KHTMLPart::slotHighlight( const QSt
-   for ( ; it != d->m_stringPortions.end() ; ++it )
-     kdDebug(6050) << "  StringPortion: from index=" << (*it).index << " -> node=" \
<< (*it).node << endl; +@@ -3442,8 +3457,10 @@ void KHTMLPart::slotHighlight( const \
QSt  #endif
-+#if (QT_VERSION >= 0x030000)
    if( renderAreaText )
    {
++#if (QT_VERSION >= 0x030000)
      if( parent )
        parent->highLightWord( length, d->m_endOffset-length );
-   }
 +#endif
+   }
    else if ( renderLineText )
    {
-     if( parentLine )
 @@ -3464,7 +3482,13 @@ void KHTMLPart::slotHighlight( const QSt
        {
          // if ( static_cast<khtml::RenderText \
                *>(d->m_selectionEnd.handle()->renderer())
--- trunk/kdenox/konq-embed/prepare_kde_src #524830:524831
@@ -442,7 +442,7 @@
                 echo "*** applying ssl-in-use patch..."
                 patch -s -d ./kdesrc/khtml -p0  -i  patches/ssl-in-use.patch 
                 echo "*** applying findNext patch..."
-#patch -s -d ./kdesrc/khtml -p0  -i  patches/findNext.patch 
+		patch -s -d ./kdesrc/khtml -p0  -i  patches/findNext.patch 
                 echo "*** applying image-scaling patch..."
                 patch -s -d ./kdesrc/khtml -p0  -i  patches/image_scaling.patch 
 		echo "*** applying frames-scaling patch..."
--- trunk/kdenox/konq-embed/src/mainwindow_road.cc #524830:524831
@@ -673,7 +673,7 @@
     focusProxy()->installEventFilter( this );
     setAutoCompletion(true);
     setDuplicatesEnabled(false);
-    loadURLHistory();
+    QTimer::singleShot(0,this,SLOT(loadURLHistory()));
 }
 
 URLCombo::~URLCombo()
--- trunk/kdenox/konq-embed/src/mainwindow_road.h #524830:524831
@@ -148,8 +148,9 @@
     void clearURLHistory();
 protected:
     virtual bool eventFilter( QObject *o, QEvent *e );
+private slots:
+    void loadURLHistory();
 private:
-    void loadURLHistory();
     void saveURLHistory();
 
     QFile m_urlHistory;
--- trunk/kdenox/konq-embed/src/preferences_road.cc #524830:524831
@@ -670,9 +670,7 @@
     certBox->addColumn(i18n("Organization"));
     certBox->addColumn(i18n("Common Name"));
 
-    QTimer *createCertTime = new QTimer(this);
-    connect( createCertTime, SIGNAL(timeout()), this, SLOT(populateCertBox()) );
-    createCertTime->start( 0, true );
+    QTimer::singleShot( 0, this, SLOT(populateCertBox()) );
 
     return certBox;
 }
@@ -784,9 +782,7 @@
     caList->addColumn(i18n("Organizational Unit"));
     caList->addColumn(i18n("Common Name"));
 
-    QTimer *createCATime = new QTimer(this);
-    connect( createCATime, SIGNAL(timeout()), this, SLOT(populateCAList()) );
-    createCATime->start( 0, true );
+    QTimer::singleShot( 0, this, SLOT(populateCAList()) );
 
     return caList;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic