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

List:       kde-commits
Subject:    kdenox/konq-embed/src
From:       Stefan Eilers <stefan.eilers () basyskom ! de>
Date:       2007-03-02 19:10:15
Message-ID: 1172862615.504515.9654.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 638634 by eilers:


Service "openURL(QString)" implemented


 M  +12 -7     mainwindow_road.cc  
 M  +4 -0      mainwindow_road.h  


--- trunk/kdenox/konq-embed/src/mainwindow_road.cc #638633:638634
@@ -114,7 +114,7 @@
    s_winStyle = STYLE_MAXIMIZED;
 
 #ifdef _QT_QPE_
-   connect(qApp, SIGNAL(appMessage(const QCString &, const QByteArray &)),
+   connect(qApp, SIGNAL(appMessage( const QCString&, const QByteArray& )),
             this, SLOT(message(const QCString &, const QByteArray &)) );
 #endif
 }
@@ -790,22 +790,27 @@
 
 void MainWindowRoad::message(const QCString &msg, const QByteArray &data)
 {
-/*
     qDebug("MainWindowRoad::message %s", (const char*)msg);
     QDataStream stream( data, IO_ReadOnly );
-    if (msg == "setDocument(QString)" )
+    if (msg == "openURL(QString)" )
     {
-        
-        dat
-        setDocument(QString);
+        stream >> m_urlByMessage;
+        qDebug( "Service openURL(QString) requested with URL: %s", m_urlByMessage.latin1() );
+        raise();
+        QTimer::singleShot( 100, this, SLOT( slotOpenURLByMessage() ) );;
+        QPEApplication::setKeepRunning();
     }
     else if (msg == "quit()" )
     {
         qApp->quit();
     }
-*/
+
 }
 
+void MainWindowRoad::slotOpenURLByMessage()
+{
+    urlEntered( m_urlByMessage );
+}
 
 
 #include "mainwindow_road.moc"
--- trunk/kdenox/konq-embed/src/mainwindow_road.h #638633:638634
@@ -57,6 +57,8 @@
     /** receives and handles QCop messages */
     void message(const QCString &msg, const QByteArray &data);
 
+    void slotOpenURLByMessage();
+
 protected:
     virtual BrowserView *createNewViewInternal( const KURL &url, 
 		    const KParts::URLArgs &args, bool withStatus = true );
@@ -133,6 +135,8 @@
         NumSecurityLevels
     };
     QPixmap m_securityIcons[NumSecurityLevels];
+
+    QString m_urlByMessage;
 };
 
 // Just a helper function object to minimize redundant code
[prev in list] [next in list] [prev in thread] [next in thread] 

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