~ubuntu-branches/ubuntu/precise/unity-2d/precise-updates

« back to all changes in this revision

Viewing changes to libunity-2d-private/src/percentcoder.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-29 16:58:34 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: package-import@ubuntu.com-20110929165834-pwezbjplrigri3wf
Tags: 4.12.0-0ubuntu1
* New upstream release
  - unity-2d-panel assert failure: *** glibc detected *** unity-2d-panel:
    malloc(): smallbin double linked list corrupted: 0x08313b28 ***
    (LP: #845979)
  - unity-2d-panel assert failure: *** glibc detected *** unity-2d-panel:
    corrupted double-linked list: 0x094bc9b0 *** (LP: #852012)
  - unity-2d-panel crashed with SIGSEGV (LP: #843432)
  - Dragging downwards from the menu bar or double clicking on the menu bar
    should un-maximise the window (LP: #661049)
  - [dash] Dash is shown when pressing and releasing quickly super+KEY
    (LP: #801073)
  - [dash] Do search, scroll down using mouse, then maximise window. Layout
    breaks (LP: #817421)
  - F10 doesn't start keyboard navigation to the panel (LP: #839628)
  - [dash] Gridview moves to top when you open or close the "Show X more.."
    dropdown or the Filter pane (LP: #850036)
  - Impossible to navigate between panel menus when the mouse cursor is over
    the panel (LP: #834065)
  - [panel] F10 menu initially shown about half screen down (LP: #853766)
  - [dash] Filter pane doesn't clear its background when switching lenses
    (LP: #858590)
  - [shortcuts] <Super><Shift># should launch a new instance of #
    application (LP: #768006)
  - unity-2d-spread missing background images when path includes Unicode
    (LP: #855508)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Canonical, Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *  Lukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation; version 3.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
#include <QUrl>
 
21
 
 
22
#include "percentcoder.h"
 
23
 
 
24
PercentCoder::PercentCoder(QObject* parent) :
 
25
    QObject(parent)
 
26
{
 
27
}
 
28
 
 
29
QString PercentCoder::encoded() const
 
30
{
 
31
    QString string(QUrl::toPercentEncoding(m_string));
 
32
    return string;
 
33
}
 
34
 
 
35
QString PercentCoder::unencoded() const
 
36
{
 
37
    return m_string;
 
38
}
 
39
 
 
40
void PercentCoder::setEncoded(const QString &string)
 
41
{
 
42
    QString str = QUrl::fromPercentEncoding(string.toAscii());
 
43
    if (str != m_string) {
 
44
        m_string = str;
 
45
        Q_EMIT stringChanged();
 
46
    }
 
47
}
 
48
 
 
49
void PercentCoder::setUnencoded(const QString& string)
 
50
{
 
51
    if (string != m_string) {
 
52
        m_string = string;
 
53
        Q_EMIT stringChanged();
 
54
    }
 
55
}
 
56
 
 
57
#include "percentcoder.moc"