FreeBSD Bugzilla – Attachment 126083 Details for
Bug 169795
[UPDATE] x11-fm/qtfm to 5.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
qtfm-5.5.patch
qtfm-5.5.patch (text/plain), 9.87 KB, created by
lichray
on 2012-07-12 01:50:01 UTC
(
hide
)
Description:
qtfm-5.5.patch
Filename:
MIME Type:
Creator:
lichray
Created:
2012-07-12 01:50:01 UTC
Size:
9.87 KB
patch
obsolete
>diff -ruN --exclude=CVS ../qtfm.orig/Makefile ./Makefile >--- ../qtfm.orig/Makefile 2012-06-06 01:44:33.000000000 -0500 >+++ ./Makefile 2012-07-11 18:10:42.911754197 -0500 >@@ -6,8 +6,7 @@ > # > > PORTNAME= qtfm >-DISTVERSION= 5.4 >-PORTREVISION= 1 >+DISTVERSION= 5.5 > CATEGORIES= x11-fm > MASTER_SITES= http://www.qtfm.org/ > >diff -ruN --exclude=CVS ../qtfm.orig/distinfo ./distinfo >--- ../qtfm.orig/distinfo 2012-05-08 18:37:31.000000000 -0500 >+++ ./distinfo 2012-07-11 18:10:52.778584511 -0500 >@@ -1,2 +1,2 @@ >-SHA256 (qtfm-5.4.tar.gz) = 8ef4c2464502959944e1b2476aa635b2a889d2859ba62dd61d8f591779c6fd0d >-SIZE (qtfm-5.4.tar.gz) = 147293 >+SHA256 (qtfm-5.5.tar.gz) = 845fc43800d12483fa1993c56a8c965ff8dc917b97f03d9ce2e24318806fb211 >+SIZE (qtfm-5.5.tar.gz) = 149667 >diff -ruN --exclude=CVS ../qtfm.orig/files/patch-src_bookmarks.cpp ./files/patch-src_bookmarks.cpp >--- ../qtfm.orig/files/patch-src_bookmarks.cpp 2012-05-08 18:37:32.000000000 -0500 >+++ ./files/patch-src_bookmarks.cpp 2012-07-11 18:20:33.785996983 -0500 >@@ -1,5 +1,5 @@ >---- src/bookmarks.cpp.orig 2012-03-08 04:46:39.000000000 -0600 >-+++ src/bookmarks.cpp 2012-04-30 14:20:26.157046128 -0500 >+--- src/bookmarks.cpp.orig 2012-07-11 18:10:56.065528820 -0500 >++++ src/bookmarks.cpp 2012-07-11 18:19:42.041677562 -0500 > @@ -22,6 +22,11 @@ > #ifndef BOOKMARKS_CPP > #define BOOKMARKS_CPP >@@ -12,7 +12,7 @@ > #include <QtGui> > #include "bookmarkmodel.h" > #include "icondlg.h" >-@@ -80,42 +85,74 @@ void MainWindow::mountWatcherTriggered() >+@@ -80,44 +85,74 @@ void MainWindow::mountWatcherTriggered() > } > > //--------------------------------------------------------------------------- >@@ -74,11 +74,12 @@ > - mtab.close(); > + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); > >+- QStringList sysMounts = QStringList() << "/dev" << "/sys" << "/pro" << "/tmp" << "/run"; > QStringList dontShowList = settings->value("hideBookmarks",0).toStringList(); > mounts.clear(); > > - foreach(QString item, mtabMounts) >-- if(item[0] == '/') >+- if(!sysMounts.contains(item.split(" ").at(1).left(4))) > + for (mnt = mntbuf; mntsize > 0; mntsize--, mnt++) > + // XXX zpool name does not start with / > + if (mnt->f_mntfromname[0] == '/' or !strcmp(mnt->f_fstypename, "zfs")) >@@ -94,6 +95,7 @@ > + //add a new auto bookmark if it doesn't exist > + if(!autoBookmarks.contains(mnt->f_mntonname)) > { >+- autoBookmarks.append(path); > - if(item.split(" ").at(2) == "iso9660") modelBookmarks->addBookmark(path,path,"1","drive-optical"); > - else if(item.split(" ").at(2).contains("fat")) modelBookmarks->addBookmark(path,path,"1","drive-removable-media"); > - else modelBookmarks->addBookmark(path,path,"1","drive-harddisk"); >diff -ruN --exclude=CVS ../qtfm.orig/files/patch-src_mymodel.cpp ./files/patch-src_mymodel.cpp >--- ../qtfm.orig/files/patch-src_mymodel.cpp 2012-05-08 18:37:32.000000000 -0500 >+++ ./files/patch-src_mymodel.cpp 2012-07-11 19:01:55.030230212 -0500 >@@ -1,5 +1,5 @@ >---- src/mymodel.cpp.orig 2012-03-09 05:00:54.000000000 -0600 >-+++ src/mymodel.cpp 2012-04-29 16:13:57.725169164 -0500 >+--- src/mymodel.cpp.orig 2012-07-11 18:21:24.302333223 -0500 >++++ src/mymodel.cpp 2012-07-11 18:59:06.428956406 -0500 > @@ -21,7 +21,6 @@ > > #include <mainwindow.h> >@@ -8,19 +8,20 @@ > #include <unistd.h> > #include <sys/ioctl.h> > >-@@ -63,9 +62,8 @@ myModel::myModel(bool realMime) >+@@ -63,10 +62,8 @@ myModel::myModel(bool realMime) > > iconFactory = new QFileIconProvider(); > > - inotifyFD = inotify_init(); > - notifier = new QSocketNotifier(inotifyFD, QSocketNotifier::Read, this); > - connect(notifier, SIGNAL(activated(int)), this, SLOT(notifyChange())); >+- connect(&eventTimer,SIGNAL(timeout()),this,SLOT(eventTimeout())); > + watcher = new QFileSystemWatcher(this); > + connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(notifyChange(QString))); > > realMimeTypes = realMime; > } >-@@ -188,28 +186,9 @@ QString myModel::getMimeType(const QMode >+@@ -189,62 +186,9 @@ QString myModel::getMimeType(const QMode > } > > //--------------------------------------------------------------------------------------- >@@ -44,38 +45,72 @@ > - > - int w = event->wd; > - >-- if(watchers.contains(w)) >+- if(eventTimer.isActive()) > - { >-- myModelItem *parent = rootItem->matchPath(watchers.value(w).split(SEPARATOR)); >-+ myModelItem *parent = rootItem->matchPath(path.split(SEPARATOR)); >- >- if(parent) >- { >-@@ -230,9 +209,7 @@ void myModel::notifyChange() >- //must of been deleted, remove from model >- if(child->fileInfo().isDir()) >- { >-- int wd = watchers.key(child->absoluteFilePath()); >-- inotify_rm_watch(inotifyFD,wd); >-- watchers.remove(wd); >-+ watcher->removePath(child->absoluteFilePath()); >- } >- beginRemoveRows(index(parent->absoluteFilePath()),child->childNumber(),child->childNumber()); >- parent->removeChild(child); >-@@ -249,23 +226,17 @@ void myModel::notifyChange() >- } >- else >- { >-- inotify_rm_watch(inotifyFD,w); >-- watchers.remove(w); >-+ watcher->removePath(path); >- } >+- if(w == lastEventID) >+- eventTimer.start(40); >+- else >+- { >+- eventTimer.stop(); >+- notifyProcess(lastEventID); >+- lastEventID = w; >+- eventTimer.start(40); >+- } >+- } >+- else >+- { >+- lastEventID = w; >+- eventTimer.start(40); > - } > - > - at += sizeof(inotify_event) + event->len; > - } > - > - notifier->setEnabled(1); >+-} >+- >+-//--------------------------------------------------------------------------------------- >+-void myModel::eventTimeout() >+-{ >+- notifyProcess(lastEventID); >+- eventTimer.stop(); >+-} >+- >+-//--------------------------------------------------------------------------------------- >+-void myModel::notifyProcess(int eventID) >+-{ >+- if(watchers.contains(eventID)) >+- { >+- myModelItem *parent = rootItem->matchPath(watchers.value(eventID).split(SEPARATOR)); >++ myModelItem *parent = rootItem->matchPath(path.split(SEPARATOR)); >+ >+ if(parent) >+ { >+@@ -265,9 +209,7 @@ void myModel::notifyProcess(int eventID) >+ //must of been deleted, remove from model >+ if(child->fileInfo().isDir()) >+ { >+- int wd = watchers.key(child->absoluteFilePath()); >+- inotify_rm_watch(inotifyFD,wd); >+- watchers.remove(wd); >++ watcher->removePath(child->absoluteFilePath()); >+ } >+ beginRemoveRows(index(parent->absoluteFilePath()),child->childNumber(),child->childNumber()); >+ parent->removeChild(child); >+@@ -282,20 +224,19 @@ void myModel::notifyProcess(int eventID) >+ endInsertRows(); >+ } >+ } >+- } >+- else >+- { >+- inotify_rm_watch(inotifyFD,eventID); >+- watchers.remove(eventID); >+- } >++ else >++ { >++ watcher->removePath(path); >++ } > } > > //--------------------------------------------------------------------------------- >@@ -90,7 +125,7 @@ > item->watched = 1; > item = item->parent(); > } >-@@ -278,7 +249,7 @@ bool myModel::setRootPath(const QString& >+@@ -308,7 +249,7 @@ bool myModel::setRootPath(const QString& > > myModelItem *item = rootItem->matchPath(path.split(SEPARATOR)); > >@@ -99,7 +134,7 @@ > > if(item->walked == 0) > { >-@@ -352,10 +323,7 @@ void myModel::refresh() >+@@ -382,10 +323,7 @@ void myModel::refresh() > { > myModelItem *item = rootItem->matchPath(QStringList("/")); > >@@ -111,7 +146,7 @@ > > beginResetModel(); > item->clearAll(); >-@@ -811,9 +779,7 @@ bool myModel::remove(const QModelIndex & >+@@ -840,9 +778,7 @@ bool myModel::remove(const QModelIndex & > QFileInfo info(children.at(i)); > if(info.isDir()) > { >diff -ruN --exclude=CVS ../qtfm.orig/files/patch-src_mymodel.h ./files/patch-src_mymodel.h >--- ../qtfm.orig/files/patch-src_mymodel.h 2012-05-08 18:37:32.000000000 -0500 >+++ ./files/patch-src_mymodel.h 2012-07-11 19:04:16.915410039 -0500 >@@ -1,23 +1,27 @@ >---- src/mymodel.h.orig 2012-03-09 00:47:45.000000000 -0600 >-+++ src/mymodel.h 2012-04-29 13:59:45.508571462 -0500 >-@@ -83,8 +83,8 @@ public: >+--- src/mymodel.h.orig 2012-07-11 19:01:59.919235618 -0500 >++++ src/mymodel.h 2012-07-11 19:03:41.246365243 -0500 >+@@ -84,10 +84,8 @@ public: > bool realMimeTypes; > > public slots: > - void notifyChange(); >+- void notifyProcess(int eventID); >+- void eventTimeout(); > - void addWatcher(myModelItem* path); > + void notifyChange(QString const& path); > + void addToWatcher(myModelItem* path); > > signals: > void dragDropPaste(const QMimeData * data, QString newPath, QStringList cutList); >-@@ -113,9 +113,7 @@ private: >+@@ -116,11 +114,7 @@ private: > QString currentRootPath; > QFileIconProvider* iconFactory; > > - int inotifyFD; > - QSocketNotifier *notifier; > - QHash<int, QString> watchers; >+- QTimer eventTimer; >+- int lastEventID; > + QFileSystemWatcher *watcher; > }; > >diff -ruN --exclude=CVS ../qtfm.orig/pkg-plist ./pkg-plist >--- ../qtfm.orig/pkg-plist 2012-05-08 18:37:31.000000000 -0500 >+++ ./pkg-plist 2012-07-11 19:08:49.464369203 -0500 >@@ -9,6 +9,7 @@ > %%DATADIR%%/qtfm_pl.qm > %%DATADIR%%/qtfm_ru.qm > %%DATADIR%%/qtfm_sr.qm >+%%DATADIR%%/qtfm_sv.qm > %%DATADIR%%/qtfm_zh.qm > %%DATADIR%%/qtfm_zh_TW.qm > @dirrm %%DATADIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169795
: 126083