~ubuntu-branches/ubuntu/raring/konversation/raring-proposed

« back to all changes in this revision

Viewing changes to src/common.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-05-24 11:33:21 UTC
  • mfrom: (2.2.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100524113321-b9txnlnyl0ojuy9u
Tags: 1.3~beta1-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - Add kubuntu_01_default_channels.diff, disable debian_channel.diff
  - Keep message indicator patches, libindicator-dev build-dep
  - Use the Kubuntu docpath (/usr/share/doc/kde)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        "([-.\\d\\w]+@[-.\\d\\w]{2,}\\.[\\w]{2,})");
32
32
    static QRegExp tdlPattern("(.*)\\.(\\w+),$");
33
33
 
34
 
    QHash<QChar,QString> initChanModesHash()
 
34
    void initChanModesHash()
35
35
    {
36
36
        QHash<QChar,QString> myHash;
37
37
 
47
47
        myHash.insert('c', i18n("no colors allowed"));
48
48
        myHash.insert('l', i18n("user throttling"));
49
49
 
50
 
        return myHash;
 
50
        m_modesHash = myHash;
51
51
    }
52
52
 
53
 
    const QHash<QChar,QString> ChanModes::m_hash = initChanModesHash();
54
 
 
55
53
    QHash<QChar,QString> getChannelModesHash()
56
54
    {
57
 
        return ChanModes::m_hash;
 
55
        if(m_modesHash.isEmpty())
 
56
            initChanModesHash();
 
57
 
 
58
        return m_modesHash;
58
59
    }
59
60
 
60
61
    QString removeIrcMarkup(const QString& text)
119
120
        line.replace("%B","\x02");       // replace %B with bold char
120
121
        line.replace("%C","\x03");       // replace %C with color char
121
122
        line.replace("%G","\x07");       // replace %G with ASCII BEL 0x07
122
 
        line.replace("%I","\x09");       // replace %I with italics char
 
123
        line.replace("%I","\x1d");       // replace %I with italics char
123
124
        line.replace("%O","\x0f");       // replace %O with reset to default char
124
125
        line.replace("%S","\x13");       // replace %S with strikethru char
125
126
        // line.replace(QRegExp("%?"),"\x15");