Hmm...
Something is going down hill tonight... How did I redeclare 'TQListViewItemIterator it'?
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/trinity/include -I/opt/trinity/include -I../../kipi-plugins/common/include -I/opt/trinity/include -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -I/opt/trinity/include/tde -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -fno-builtin -g3 -fno-inline -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpermissive -fpermissive -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT flickrtalker.lo -MD -MP -MF .deps/flickrtalker.Tpo -c -o flickrtalker.lo flickrtalker.cpp imageslist.cpp: In member function 'void KIPIFlickrExportPlugin::ImagesList::slotAddImages(const KURL::List&)': imageslist.cpp:231:35: error: redeclaration of 'TQListViewItemIterator it' imageslist.cpp:223:36: error: 'TQValueList<KURL>::const_iterator it' previously declared here libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/trinity/include -I/opt/trinity/include -I../../kipi-plugins/common/include -I/opt/trinity/include -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -I/opt/trinity/include/tde -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -fno-builtin -g3 -fno-inline -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpermissive -fpermissive -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT flickrtalker.lo -MD -MP -MF .deps/flickrtalker.Tpo -c flickrtalker.cpp -fPIC -DPIC -o .libs/flickrtalker.o make[3]: *** [imageslist.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .deps/plugin_flickrexport.Tpo .deps/plugin_flickrexport.Plo mv -f .deps/flickrwindow.Tpo .deps/flickrwindow.Plo mv -f .deps/flickrtalker.Tpo .deps/flickrtalker.Plo make[3]: Leaving directory `/build/src/kipi-plugins/kipi-plugins/flickrexport' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/build/src/kipi-plugins/kipi-plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/build/src/kipi-plugins' make: *** [all] Error 2
Something is going down hill tonight... How did I redeclare 'TQListViewItemIterator it'?
You might want to leave libkipi, kipi-plugins, gwenview, and digikam go for a bit. All but gwenview need to be updated to the last official release. Our versions are not the last. kipi-plugins has had us all fooled for a long time. The package builds without error (here), but neither gwenview nor digikam will find the plugins and build their hooks.
Broke, broke, broke.
I'm hoping in the upcoming days to update everything, which takes a lot of time with old-fashioned eyeball comparisons and note-taking. I actuall started a few days ago but got distracted with another bug report.
All four packages build correctly in my KDE3 system. Therefore I have a proverbial yardstick to attempt the updating.
Darrell
On 04/04/2012 11:00 PM, Darrell Anderson wrote:
Something is going down hill tonight... How did I redeclare 'TQListViewItemIterator it'?
You might want to leave libkipi, kipi-plugins, gwenview, and digikam go for a bit. All but gwenview need to be updated to the last official release. Our versions are not the last. kipi-plugins has had us all fooled for a long time. The package builds without error (here), but neither gwenview nor digikam will find the plugins and build their hooks.
Broke, broke, broke.
I'm hoping in the upcoming days to update everything, which takes a lot of time with old-fashioned eyeball comparisons and note-taking. I actuall started a few days ago but got distracted with another bug report.
All four packages build correctly in my KDE3 system. Therefore I have a proverbial yardstick to attempt the updating.
Darrell
Yes,
And it looks like this little commit is the one that finally broke it :)
http://git.trinitydesktop.org/cgit/kipi-plugins/commit/?id=21b5bfab4d2467a0f...
- qDebug("ImageMagick Command line args:"); + tqDebug("ImageMagick Command line args:"); TQValueList<TQCString> args = process.args(); for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it) - qDebug("%s", (const char*)(*it)); + tqDebug("%s", (const char*)(*it));
Which got monkeyed with all through out the commit :)
On 04/04/2012 11:35 PM, David C. Rankin wrote:
On 04/04/2012 11:00 PM, Darrell Anderson wrote:
Something is going down hill tonight... How did I redeclare 'TQListViewItemIterator it'?
You might want to leave libkipi, kipi-plugins, gwenview, and digikam go for a bit. All but gwenview need to be updated to the last official release. Our versions are not the last. kipi-plugins has had us all fooled for a long time. The package builds without error (here), but neither gwenview nor digikam will find the plugins and build their hooks.
Broke, broke, broke.
I'm hoping in the upcoming days to update everything, which takes a lot of time with old-fashioned eyeball comparisons and note-taking. I actuall started a few days ago but got distracted with another bug report.
All four packages build correctly in my KDE3 system. Therefore I have a proverbial yardstick to attempt the updating.
Darrell
Yes,
And it looks like this little commit is the one that finally broke it :)
http://git.trinitydesktop.org/cgit/kipi-plugins/commit/?id=21b5bfab4d2467a0f...
- qDebug("ImageMagick Command line args:");
- tqDebug("ImageMagick Command line args:");
TQValueList<TQCString> args = process.args(); for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it)
- qDebug("%s", (const char*)(*it));
tqDebug("%s", (const char*)(*it));
Which got monkeyed with all through out the commit :)
I went ahead and opened http://bugs.pearsoncomputing.net/bugzilla/show_bug.cgi?id=957 to give us a page to capture the kipi-plugins issues on.
And it looks like this little commit is
the one that finally broke it :)
http://git.trinitydesktop.org/cgit/kipi-plugins/commit/?id=21b5bfab4d2467a0f...
- qDebug("ImageMagick Command line args:");
- tqDebug("ImageMagick Command line args:");
TQValueList<TQCString> args = process.args(); for (TQValueList<TQCString>::iterator it =
args.begin(); it != args.end(); ++it)
- qDebug("%s", (const char*)(*it));
tqDebug("%s", (const char*)(*it));
Which got monkeyed with all through
out the commit :)
I went ahead and opened http://bugs.pearsoncomputing.net/bugzilla/show_bug.cgi?id=957 to give us a page to capture the kipi-plugins issues on.
I don't understand. The patch only change qDebug and qWarning, not any "iterator" functions or lines.
Darrell
On 04/05/2012 10:59 AM, Darrell Anderson wrote:
I don't understand. The patch only change qDebug and qWarning, not any "iterator" functions or lines.
Darrell
Hmm - that makes two of us. Nothing makes sense right now :( I see that the changes only affected the lines around 'TQListViewItemIterator it' and not the iterator itself. Grepping it looks like the gpssyncdialog.cpp and imageslist.cpp both contain the same declaration, but if it is limited to file scope that shouldn't matter:
12:55 archangel:/dat_e/chroot/david/build/src/kipi-plugins> grep -r 'TQListViewItemIterator it' * kipi-plugins/kameraklient/camerafolderview.cpp: TQListViewItemIterator it(this); kipi-plugins/kameraklient/setupcamera.cpp: TQListViewItemIterator it(listView_); kipi-plugins/ipodexport/ipodexportdialog.cpp: TQListViewItemIterator it2( m_uploadList ); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it( d->listView ); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it( d->listView ); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it( d->listView ); kipi-plugins/gpssync/gpssyncdialog.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/rawconverter/batchdialog.cpp: TQListViewItemIterator it( m_listView ); kipi-plugins/rawconverter/batchdialog.cpp: TQListViewItemIterator it( m_listView ); kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp: TQListViewItemIterator it2( m_listFiles ); kipi-plugins/flickrexport/imageslist.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/flickrexport/imageslist.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/flickrexport/imageslist.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/flickrexport/imageslist.cpp: TQListViewItemIterator it(d->listView); kipi-plugins/flickrexport/imageslist.cpp: TQListViewItemIterator it(d->listView);
But when it gets to the imagelist.cpp build, gcc is complaining that it has 2 declarations for 'TQListViewItemIterator it'???
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/trinity/include -I/opt/trinity/include -I../../kipi-plugins/common/include -I/opt/trinity/include -I/opt/trinity/include -I/opt/tqt3/include -I. -include tqt.h -I/opt/trinity/include/tde -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -fno-builtin -g3 -fno-inline -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fpermissive -fpermissive -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT imageslist.lo -MD -MP -MF .deps/imageslist.Tpo -c imageslist.cpp -fPIC -DPIC -o .libs/imageslist.o In file included from /opt/trinity/include/kfileitem.h:31:0, from /opt/trinity/include/kio/previewjob.h:27, from imageslist.cpp:42: /opt/trinity/include/kfilemetainfo.h:1237:34: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] imageslist.cpp: In member function 'void KIPIFlickrExportPlugin::ImagesList::slotAddImages(const KURL::List&)': imageslist.cpp:231:35: error: redeclaration of 'TQListViewItemIterator it' imageslist.cpp:223:36: error: 'TQValueList<KURL>::const_iterator it' previously declared here
I think your patch is in the clear, it looks like this will be another gcc 4.7 present...
But when it gets to the imagelist.cpp build, gcc is complaining that it has 2 declarations for 'TQListViewItemIterator it'???
The error message makes sense.
The declaration of TQListViewItemIterator it(d->listView); occurs five times, each time in a different function.
Apparently in function slotAddImages the declaration is seen twice. Once from the explicit declaration and once indirectly through a call to one of the other functions.
The first question is why gcc 4.7 doesn't like this when previous versions have. The second question is how to fix. I understand the message, but lack the C++ skills to know the remedy. Probaby easy for the C++ gurus.
I think your patch is in the clear, it looks like this will be another gcc 4.7 present...
Wasn't my patch. :)
Darrell
On 04/05/2012 01:39 PM, Darrell Anderson wrote:
But when it gets to the imagelist.cpp build, gcc is complaining that it has 2 declarations for 'TQListViewItemIterator it'???
The error message makes sense.
The declaration of TQListViewItemIterator it(d->listView); occurs five times, each time in a different function.
Apparently in function slotAddImages the declaration is seen twice. Once from the explicit declaration and once indirectly through a call to one of the other functions.
The first question is why gcc 4.7 doesn't like this when previous versions have. The second question is how to fix. I understand the message, but lack the C++ skills to know the remedy. Probaby easy for the C++ gurus.
I 'think' it is this:
-> G++ now correctly implements the two-phase lookup rules such that an unqualified name used in a template must have:
(1) an appropriate declaration found either in scope at the point of definition of the template; or
(2) by argument-dependent lookup at the point of instantiation.
The question is if you have (1) & (2) instead of (1) | (2) do you get this redeclaration error??
On 04/05/2012 03:45 PM, David C. Rankin wrote:
On 04/05/2012 01:39 PM, Darrell Anderson wrote:
But when it gets to the imagelist.cpp build, gcc is complaining that it has 2 declarations for 'TQListViewItemIterator it'???
The error message makes sense.
The declaration of TQListViewItemIterator it(d->listView); occurs five times, each time in a different function.
Apparently in function slotAddImages the declaration is seen twice. Once from the explicit declaration and once indirectly through a call to one of the other functions.
The first question is why gcc 4.7 doesn't like this when previous versions have. The second question is how to fix. I understand the message, but lack the C++ skills to know the remedy. Probaby easy for the C++ gurus.
I 'think' it is this:
-> G++ now correctly implements the two-phase lookup rules such that an unqualified name used in a template must have:
(1) an appropriate declaration found either in scope at the point of definition of the template; or
(2) by argument-dependent lookup at the point of instantiation.
The question is if you have (1) & (2) instead of (1) | (2) do you get this redeclaration error??
The failure continues as of today. As Darrell pointed out, there are multiple declarations of 'TQListViewItemIterator it( d->listView )' in kipi-plugins/flickrexport/imageslist.cpp that are now both seen by gcc 4.7. Could one of the c/c++ gurus take a look at suggest how to make sure this is only seen once? Thanks.
The error message makes sense.
The declaration of TQListViewItemIterator
it(d->listView); occurs five times, each time in a different function.
Apparently in function slotAddImages the
declaration is seen twice. Once from the explicit declaration and once indirectly through a call to one of the other functions.
The first question is why gcc 4.7 doesn't like this
when previous versions have. The second question is how to fix. I understand the message, but lack the C++ skills to know the remedy. Probaby easy for the C++ gurus.
I 'think' it is this:
-> G++ now correctly implements the two-phase lookup
rules such that an unqualified name used in a template must have:
(1) an appropriate declaration found either in scope at
the point of definition of the template; or
(2) by argument-dependent lookup at the point of
instantiation.
The question is if you have (1) & (2) instead of
(1) | (2) do you get this redeclaration error??
The failure continues as of today. As Darrell pointed out, there are multiple declarations of 'TQListViewItemIterator it( d->listView )' in kipi-plugins/flickrexport/imageslist.cpp that are now both seen by gcc 4.7. Could one of the c/c++ gurus take a look at suggest how to make sure this is only seen once? Thanks.
I won't say for sure, but in commit 21705d1b 2012-04-05 where I cleaned some typos, that effort inadvertently created two identical declarations. The code never failed previously because the typos actually caused two different declarations, one of which was no longer being used. The remaining declaration one was abandoned in place, so to speak, but caused no harm. My typo scrubbing caused the two declarations to become identical. I had to fix that in commit 63df5ccd 2012-04-06.
Point being? Let the gurus decide but I think only one of the five declarations is being duplicated, but perhaps the solution is as simple as deleting the explicit declaration in function slotAddImages.
Darrell
On 04/10/2012 06:32 PM, Darrell Anderson wrote:
I won't say for sure, but in commit 21705d1b 2012-04-05 where I cleaned some typos, that effort inadvertently created two identical declarations. The code never failed previously because the typos actually caused two different declarations, one of which was no longer being used. The remaining declaration one was abandoned in place, so to speak, but caused no harm. My typo scrubbing caused the two declarations to become identical. I had to fix that in commit 63df5ccd 2012-04-06.
Point being? Let the gurus decide but I think only one of the five declarations is being duplicated, but perhaps the solution is as simple as deleting the explicit declaration in function slotAddImages.
Darrell
Any suggested work-around for the time being? I would hate to just blindly start hacking 'd' -> 'f' or something similar (which is pretty much what I would be doing). But for someone experienced, it would only take a second or so I'm sure.
On 04/10/2012 06:32 PM, Darrell Anderson wrote:
I won't say for sure, but in commit 21705d1b 2012-04-05 where I cleaned some typos, that effort inadvertently created two identical declarations. The code never failed previously because the typos actually caused two different declarations, one of which was no longer being used. The remaining declaration one was abandoned in place, so to speak, but caused no harm. My typo scrubbing caused the two declarations to become identical. I had to fix that in commit 63df5ccd 2012-04-06.
Point being? Let the gurus decide but I think only one of the five declarations is being duplicated, but perhaps the solution is as simple as deleting the explicit declaration in function slotAddImages.
Darrell
Any suggested work-around for the time being? I would hate to just blindly start hacking 'd' -> 'f' or something similar (which is pretty much what I would be doing). But for someone experienced, it would only take a second or so I'm sure.
I think I see the problem, but haven't recompiled to test if this idea resolves it for sure.
It looks like for whatever reason gcc < 4.7 was't barfing when the new "it" object was created within the scope of the existing "it" object, which was created within the for loop definition. Thus, gcc's new behaviour is definitely correct.
The easiest fix is to replace all instances of "TQListViewItemIterator it(d->listView);" with "TQListViewItemIterator it2(d->listView);" or similar.
Tim
On 04/10/2012 06:53 PM, Timothy Pearson wrote:
I think I see the problem, but haven't recompiled to test if this idea resolves it for sure.
It looks like for whatever reason gcc < 4.7 was't barfing when the new "it" object was created within the scope of the existing "it" object, which was created within the for loop definition. Thus, gcc's new behaviour is definitely correct.
The easiest fix is to replace all instances of "TQListViewItemIterator it(d->listView);" with "TQListViewItemIterator it2(d->listView);" or similar.
Thank you Tim!
I'll give it a go and report back.
On 04/12/2012 11:03 PM, David C. Rankin wrote:
On 04/10/2012 06:53 PM, Timothy Pearson wrote:
I think I see the problem, but haven't recompiled to test if this idea resolves it for sure.
It looks like for whatever reason gcc < 4.7 was't barfing when the new "it" object was created within the scope of the existing "it" object, which was created within the for loop definition. Thus, gcc's new behaviour is definitely correct.
The easiest fix is to replace all instances of "TQListViewItemIterator it(d->listView);" with "TQListViewItemIterator it2(d->listView);" or similar.
Thank you Tim!
I'll give it a go and report back.
Here is the question -- "Which 'it's to I change to (eg: it6) in the code:
for(KURL::List::const_iterator it = list.begin(); it != list.end(); ++it) { KURL imageUrl = *it;
// Check if the new item already exist in the list.
bool find = false;
-> TQListViewItemIterator it6(d->listView); -> while (it.current()) { -> ImagesListViewItem* item = dynamic_cast<ImagesListViewItem*>(*it);
if (item->url() == imageUrl) find = true;
-> ++it; // does this become '++it6;' }
if (!find) { new ImagesListViewItem(d->listView, imageUrl); urls.append(imageUrl); } }
How do I confirm that the 'it' I have marked with the sidebar '->' are the correct 'it's to change to 'it6' and not 'it's that should remain 'it's under the KURL::List construct??
On 04/13/2012 12:40 AM, David C. Rankin wrote:
On 04/12/2012 11:03 PM, David C. Rankin wrote:
On 04/10/2012 06:53 PM, Timothy Pearson wrote:
I think I see the problem, but haven't recompiled to test if this idea resolves it for sure.
It looks like for whatever reason gcc < 4.7 was't barfing when the new "it" object was created within the scope of the existing "it" object, which was created within the for loop definition. Thus, gcc's new behaviour is definitely correct.
The easiest fix is to replace all instances of "TQListViewItemIterator it(d->listView);" with "TQListViewItemIterator it2(d->listView);" or similar.
Thank you Tim!
I'll give it a go and report back.
<snip>
How do I confirm that the 'it' I have marked with the sidebar '->' are the correct 'it's to change to 'it6' and not 'it's that should remain 'it's under the KURL::List construct??
It Built! (now I dunno if it will work), but it did build on gcc47 w/o any major complaints!
I have attached the patch I created based on your suggestions for the others to verify and confirm. Thanks! If this works out, then we are on to the next one...
md5sum: '5aec8e9062f120ac4aafaa41b75812db'