Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why do I get Qt Warnings?

Why do I get Qt Warnings?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 866 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qnoobish
    wrote on last edited by
    #1

    Hello,

    I am using a class and it throws me warnings referenced to Signals&slots, but I don't know the background of this, I would like to build my class the right way with no warnings.

    This is my class in question:

    @
    class PluginPage : public QDeclarativeItem
    {
    Q_OBJECT

    Q_PROPERTY (QString groupName READ getGroupName WRITE setGroupName)

    public:
    PluginPage(QDeclarativeItem* poParent = NULL);
    virtual ~PluginPage(void);

    void setGroupName (const QString& sName);
    QString getGroupName () const;

    public slots:
    void recoverConnection(QString msg);
    void setPluginSize(int iWidth, int iHeight);

    signals:
    void reconnectionMsg(QString msg);
    void widthChanged();
    void heightChanged();

    private:
    QString m_sGroupName;;
    };
    @

    and the Warnings:

    c:\tool\qt5\5.1.0\msvc2010\include\qtcore\qobject_impl.h(133): warning C4512: 'QtPrivate::QSlotObjectBase' : assignment operator could not be generated
    1> c:\tool\qt5\5.1.0\msvc2010\include\qtcore\qobject_impl.h(107) : see declaration of 'QtPrivate::QSlotObjectBase'
    1>c:\tool\qt5\5.1.0\msvc2010\include\qtdeclarative\qdeclarativeprivate.h(240): warning C4510: 'QDeclarativePrivate::RegisterComponent' : default constructor could not be generated
    1> c:\tool\qt5\5.1.0\msvc2010\include\qtdeclarative\qdeclarativeprivate.h(234) : see declaration of 'QDeclarativePrivate::RegisterComponent'
    1>c:\tool\qt5\5.1.0\msvc2010\include\qtdeclarative\qdeclarativeprivate.h(240): warning C4512: 'QDeclarativePrivate::RegisterComponent' : assignment operator could not be generated
    1> c:\tool\qt5\5.1.0\msvc2010\include\qtdeclarative\qdeclarativeprivate.h(234) : see declaration of 'QDeclarativePrivate::RegisterComponent'
    1>c:\tool\qt5\5.1.0\msvc2010\include\qtdeclarative\qdeclarativeprivate.h(240): warning C4610: struct 'QDeclarativePrivate::RegisterComponent' can never be instantiated - user defined constructor required
    1>
    1>Build succeeded.

    And I am using Qt5.1 libraries and MSVC 2010 with Warnig Level4 (/W4).

    It would be great if anyone could share some ideas.

    Thanks in advance!

    In short, software is eating the world.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved