From 11187b64f4473cf8b7993e323e0f6d0294f6609e Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 12 May 2010 17:20:09 +0200 Subject: Solved issue with mRefreshA in FilesystemWidget FilesystemWidget needs a pointer to the QAction triggering a refresh to disable it under certain circumstances. The current solution was to search the actions() of a child widget for a specific string in QAction::data(). Don't like it. Now SheMov sets the refresh action via a member function of FilesystemWidget. --- shemov.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index f7439e1..f98272f 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -280,7 +280,7 @@ void SheMov::createActions(){ connect(mDeleteFilesA, SIGNAL(triggered()), mFSWidget, SLOT(deleteFiles())); mRefreshA = new QAction(tr("Refresh"), this); mRefreshA->setShortcut(Qt::Key_F4); - mRefreshA->setData("RE"); + mFSWidget->setRefreshAction(mRefreshA); connect(mRefreshA, SIGNAL(triggered()), mFSWidget->fileView(), SLOT(refresh())); connect(mRefreshA, SIGNAL(triggered()), this, SLOT(setFsFree())); mCopyA = new QAction(tr("Copy file(s)..."), this); -- cgit v1.2.3-70-g09d2