~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to src/widgets/urlobject.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2010-02-19 09:37:12 UTC
  • mfrom: (6.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100219093712-e225xvm1wjcf1cgi
Tags: 0.14-2
* comment out only function which uses va_list to work around build
  problems on armel
* Set Standards-Version to 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
        void connectXmppAction(QAction* action, const QString& query)
42
42
        {
43
 
                connect(action, SIGNAL(activated()), &xmppActionMapper, SLOT(map()));
 
43
                connect(action, SIGNAL(triggered()), &xmppActionMapper, SLOT(map()));
44
44
                xmppActionMapper.setMapping(action, query);
45
45
        }
46
46
 
52
52
                
53
53
                tr = qApp->translate("URLLabel", "Open");
54
54
                act_xmpp = new IconAction(tr, "psi/jabber", tr, 0, this);
55
 
                connect(act_xmpp, SIGNAL(activated()), SLOT(popupAction()));
 
55
                connect(act_xmpp, SIGNAL(triggered()), SLOT(popupAction()));
56
56
 
57
57
                tr = qApp->translate("URLLabel", "Open mail composer");
58
58
                act_mailto = new IconAction(tr, "psi/email", tr, 0, this);
59
 
                connect(act_mailto, SIGNAL(activated()), SLOT(popupAction()));
 
59
                connect(act_mailto, SIGNAL(triggered()), SLOT(popupAction()));
60
60
        
61
61
                tr = qApp->translate("URLLabel", "Open web browser");
62
62
                act_browser = new IconAction(tr, "psi/www", tr, 0, this);
63
 
                connect(act_browser, SIGNAL(activated()), SLOT(popupAction()));
 
63
                connect(act_browser, SIGNAL(triggered()), SLOT(popupAction()));
64
64
 
65
65
                tr = qApp->translate("URLLabel", "Add to Roster");
66
66
                act_add_to_roster = new IconAction(tr, "psi/addContact", tr, 0, this);
67
67
                connectXmppAction(act_add_to_roster, "roster");
68
68
 
69
 
                tr = qApp->translate("URLLabel", "Send massage to");
 
69
                tr = qApp->translate("URLLabel", "Send message to");
70
70
                act_send_message = new IconAction(tr, "psi/message", tr, 0, this);
71
71
                connectXmppAction(act_send_message, "message");
72
72
                
80
80
 
81
81
                tr = qApp->translate("URLLabel", "Copy location");
82
82
                act_copy = new IconAction(tr, tr, 0, this);
83
 
                connect(act_copy, SIGNAL(activated()), SLOT(popupCopy()));
 
83
                connect(act_copy, SIGNAL(triggered()), SLOT(popupCopy()));
84
84
 
85
85
                connect(&xmppActionMapper, SIGNAL(mapped(const QString&)), SLOT(xmppAction(const QString&)));
86
86
        }
89
89
        {
90
90
                QString l = from;
91
91
 
92
 
                int colon = l.find(':');
 
92
                int colon = l.indexOf(':');
93
93
                if ( colon == -1 )
94
94
                        colon = 0;
95
95
                QString service = l.left( colon );
131
131
                if (uri.queryItems().value(0).first != queryType) {
132
132
                        uri.setEncodedQuery(query.toAscii());
133
133
                }
134
 
                emit urlObject->openURL(uri);
 
134
                emit urlObject->openURL(uri.toString());
135
135
        }
136
136
 
137
137
        void xmppAction(const QString& query) {
175
175
        if ( d->link.isEmpty() )
176
176
                return 0;
177
177
 
178
 
        int colon = d->link.find(':');
 
178
        int colon = d->link.indexOf(':');
179
179
        if ( colon == -1 )
180
180
                colon = 0;
181
181
        QString service = d->link.left( colon );