Changeset 5ce0b8


Ignore:
Timestamp:
01/17/12 13:31:01 (16 months ago)
Author:
Micke Prag <micke.prag@…>
Branches:
('master', '033cf796174446f5fff5bbfad1cbf1e4af35c0d8')('controller-upgrade', '72b31cc86eeeef18f1371a3067b6e8a5ca21abfc')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
Children:
645ef2098e00e54a96cbcc13ecd9b504fe64768b
Parents:
5b3b6699970beabbd1af5f4a45002244dfa42de5
git-author:
Micke Prag <micke.prag@telldus.se>2012-01-17 13:31:01+01:00
git-committer:
Micke Prag <micke.prag@telldus.se>2012-01-17 13:31:01+01:00
Message:

Add function QMLArray::removeLater()

Location:
telldus-gui/Plugins/QML
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • telldus-gui/Plugins/QML/qmlarray.cpp

    r5b3b66 r5ce0b8  
    11#include "qmlarray.h" 
     2#include <QMetaMethod> 
    23 
    34class QMLArray::PrivateData { 
     
    4041} 
    4142 
     43void QMLArray::removeLater(int index) { 
     44        int methodIndex = this->metaObject()->indexOfMethod(QMetaObject::normalizedSignature("remove(int)")); 
     45        QMetaMethod method = this->metaObject()->method(methodIndex); 
     46        method.invoke(this, Qt::QueuedConnection, Q_ARG(int, index)); 
     47} 
     48 
    4249int QMLArray::rowCount(const QModelIndex &parent) const { 
    4350        return d->list.size(); 
  • telldus-gui/Plugins/QML/qmlarray.h

    ra182ba r5ce0b8  
    2121        void push(const QScriptValue &v); 
    2222        void remove(int index); 
     23        void removeLater(int index); 
    2324        QVariant get(int index) const; 
    2425 
Note: See TracChangeset for help on using the changeset viewer.