hello!
since i found some serious and annoying bugs in dolphin (kde3) and nobody seems to work on them i decided to do it myself.
the problem i have right now is that one slot (updateNavigatorURL()) that is connected to a signal (clicked()) won´t be executed, although the connect statement returns true.
in the original code this worked of course, but since i had to change the (quite poor) design i couldn´t work out the problem by comparing the codes (although i tried). well actually i couldn´t even find out what exactly the problem is...
so hopefully here´s someone who´s able to help me out with this one, since i´m new to qt/kde development.
should not be too hard to find for someone with more experience than me.
great thanks in advance, witti

urlnavigatorbutton.h:
Qt Code:
  1. ...
  2. class URLNavigatorButton : public URLButton
  3. {
  4. Q_OBJECT
  5.  
  6. public:
  7. URLNavigatorButton(URLNavigator* parent = 0);
  8. URLNavigatorButton(int index, URLNavigator* parent = 0);
  9. virtual ~URLNavigatorButton();
  10. void setIndex(int index);
  11. int index() const;
  12. bool isLastButton();
  13.  
  14. protected:
  15. virtual void drawButton(QPainter* painter);
  16. virtual void enterEvent(QEvent* event);
  17. virtual void leaveEvent(QEvent* event);
  18. //drag
  19. void mousePressEvent( QMouseEvent *event );
  20. void mouseMoveEvent( QMouseEvent *event );
  21. //drop
  22. virtual void dropEvent(QDropEvent* event);
  23. virtual void dragEnterEvent(QDragEnterEvent* event);
  24. virtual void dragLeaveEvent(QDragLeaveEvent* event);
  25.  
  26. private slots:
  27. void updateNavigatorURL();
  28. void startPopupDelay();
  29. void stopPopupDelay();
  30. void startListJob();
  31. void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
  32. void listJobFinished(KIO::Job* job);
  33. ...
To copy to clipboard, switch view to plain text mode 


urlnavigatorbutton.cpp:
Qt Code:
  1. ...
  2. URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* parent) :
  3. URLButton(parent),
  4. m_index(-1),
  5. m_listJob(0)
  6. {
  7. setAcceptDrops(true);
  8. setMinimumWidth(arrowWidth());
  9. setIndex(index);
  10. connect(this, SIGNAL(clicked()), this, SLOT(updateNavigatorURL()));
  11.  
  12. m_popupDelay = new QTimer(this);
  13. connect(m_popupDelay, SIGNAL(timeout()), this, SLOT(startListJob()));
  14. connect(this, SIGNAL(pressed()), this, SLOT(startPopupDelay()));
  15. }
  16. ...
  17. void URLNavigatorButton::updateNavigatorURL()
  18. {
  19. URLNavigator* navigator = urlNavigator();
  20. assert(navigator != 0);
  21. navigator->setURL(navigator->url(m_index));
  22. }
To copy to clipboard, switch view to plain text mode