~sil/ubuntu-keyboard/numbers-on-top-row

« back to all changes in this revision

Viewing changes to src/lib/models/layout.cpp

  • Committer: Guenter Schwann
  • Date: 2013-11-13 15:36:39 UTC
  • mfrom: (101.4.5 keyboard-cleanups)
  • Revision ID: guenter.schwann@canonical.com-20131113153639-9i9irt1mle00vy1t
Remove some dead code

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "key.h"
35
35
#include "keydescription.h"
36
36
 
37
 
#include "logic/keyareaconverter.h"
38
37
#include "logic/dynamiclayout.h"
39
38
 
40
39
#include <QtGui/QGuiApplication>
315
314
    }
316
315
 
317
316
    case RoleKeyText:
318
 
        return QVariant(key.label().text());
 
317
        return QVariant(key.label());
319
318
 
320
319
    case RoleKeyFont:
321
 
        return QVariant(QString(key.label().font().name()));
 
320
        return QVariant(QString());
322
321
 
323
322
    case RoleKeyFontColor:
324
323
        // FIXME: QML expects QVariant(QColor(...)) here, but then we'd have a QtGui dependency, no?
325
 
        return QVariant(QString(key.label().font().color()));
 
324
        return QVariant(QString());
326
325
 
327
326
    case RoleKeyFontSize:
328
327
        // FIXME: Using qMax to suppress warning about "invalid" 0.0 font sizes in QFont::setPointSizeF.
329
 
        return QVariant(qMax<int>(1, key.label().font().size()));
 
328
        return QVariant(1);
330
329
 
331
330
    case RoleKeyFontStretch:
332
 
        return QVariant(key.label().font().stretch());
 
331
        return QVariant(1);
333
332
 
334
333
    case RoleKeyIcon:
335
334
        return QVariant(toUrl(d->image_directory, key.icon()));