Changeset 6160 for trunk/qt4-gui/src/core
- Timestamp:
- 04/18/08 09:40:19 (8 months ago)
- Location:
- trunk/qt4-gui/src/core
- Files:
-
- 2 modified
-
licqgui.cpp (modified) (5 diffs)
-
licqgui.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/core/licqgui.cpp
r6153 r6160 40 40 #include <KDE/KUrl> 41 41 #else 42 # include <QDesktopServices> 42 43 # include <QStyle> 43 44 # include <QStyleFactory> 45 # include <QUrl> 44 46 #endif 45 47 … … 858 860 859 861 UserViewEvent* e = new UserViewEvent(id, ppid); 860 connect(e, SIGNAL(viewUrl(QWidget*, QString)), SLOT(viewUrl(QWidget*, QString)));861 862 862 863 e->show(); … … 969 970 if (e == NULL) return NULL; 970 971 971 connect(e, SIGNAL(viewUrl(QWidget*, QString)), SLOT(viewUrl(QWidget*, QString)));972 973 972 QWidget* msgWindow = e; 974 973 if (Config::Chat::instance()->tabbedChatting()) … … 1042 1041 } 1043 1042 1044 void LicqGui::viewUrl(Q Widget* parent, QString url)1043 void LicqGui::viewUrl(QString url) 1045 1044 { 1046 1045 #ifdef USE_KDE … … 1048 1047 KToolInvocation::invokeMailer(KUrl(url)); 1049 1048 else 1050 // If no URL viewer is set, use KDE default1051 if (!myLicqDaemon->getUrlViewer())1052 1049 KToolInvocation::invokeBrowser(url); 1053 else1054 1050 #else 1055 // If no URL viewer is set, try DEFAULT_URL_VIEWER (mozilla) 1056 if (!myLicqDaemon->getUrlViewer()) 1057 myLicqDaemon->setUrlViewer(DEFAULT_URL_VIEWER); 1051 if (!QDesktopServices::openUrl(QUrl(url))) 1052 { 1053 if (!myLicqDaemon->getUrlViewer()) 1054 myLicqDaemon->setUrlViewer(DEFAULT_URL_VIEWER); 1055 if (!myLicqDaemon->ViewUrl(url.toLocal8Bit().data())) 1056 WarnUser(NULL, tr("Licq is unable to start your browser and open the URL.\n" 1057 "You will need to start the browser and open the URL manually.")); 1058 } 1058 1059 #endif 1059 {1060 if (!myLicqDaemon->ViewUrl(url.toLocal8Bit().data()))1061 WarnUser(parent,1062 tr("Licq is unable to start your browser and open the URL.\n"1063 "You will need to start the browser and open the URL manually."));1064 }1065 1060 } 1066 1061 -
trunk/qt4-gui/src/core/licqgui.h
r6153 r6160 194 194 void changeStatus(unsigned long status, unsigned long ppid, bool invisible = false); 195 195 196 /** 197 * Invoke the desktop-aware URL viewer 198 * 199 * @param url The URL to open 200 */ 201 void viewUrl(QString url); 202 196 203 public slots: 197 204 /** … … 222 229 void sendFileTransfer(QString id, unsigned long ppid, const QString& filename, const QString& description); 223 230 void sendChatRequest(QString id, unsigned long ppid); 224 225 void viewUrl(QWidget* parent, QString url);226 231 227 232 private slots:
