Qt Labs Forum » ModelTest

(const char *) typecast

(2 posts)
  • Started 1 year ago by abatishko
  • Latest reply from Benjamin Meyer

  1. abatishko
    abatishko
    Member

    Since Qt provides a mechanism for preventing type casts from const char * to QString, it would be nice if the ModelTest code compiled in such an environment. It's a simple change around line 382:

    This line:
    Q_ASSERT(model->setData(QModelIndex(), "foo", Qt::DisplayRole) == false);

    Changes to this line:
    Q_ASSERT(model->setData(QModelIndex(), QLatin1String("foo"), Qt::DisplayRole) == false);

    Is there any chance this change could get checked into the subversion repository?

    Posted: 1 year #
  2. Benjamin Meyer
    Benjamin Meyer
    Administrator

    I have made the change to subversion. Thanks for the report.

    Posted: 1 year #

RSS feed for this topic

Reply

You must log in to post.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.