Results 1 to 2 of 2

Thread: Warnings concerning private slots with Qt Jambi

  1. #1
    Join Date
    Jan 2006
    Location
    Frankfurt, Germany
    Posts
    34
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Warnings concerning private slots with Qt Jambi

    Hello,

    I get a warning from the java compiler if there is a private function, whose only invocations go the signal-slot way, like this:
    Qt Code:
    1. public Mainwindow() {
    2. ...
    3. m_ui.actionHinzuf_gen_2.triggered.connect(this, "addCategory()");
    4. ...
    5. }
    6.  
    7. private void addCategory() {
    8. AddCategoryWidget acw=new AddCategoryWidget(this);
    9. m_layoutManager.showWidget(acw);
    10. }
    To copy to clipboard, switch view to plain text mode 
    The method addCategory() from the type Mainwindow is never used locally
    Is there another possibility to getting rid of this warning than to disable all warnings of this type or to making the function protected?

    best regards,
    kiker99

  2. #2
    Join Date
    Feb 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Warnings concerning private slots with Qt Jambi

    You can throw a

    @SuppressWarnings("unused")

    annotation on the unused private function. That should kill your warning.

Similar Threads

  1. We'll need a QT Jambi section!
    By GreyGeek in forum General Discussion
    Replies: 23
    Last Post: 30th September 2006, 00:38
  2. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04
  3. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.