KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
100725
:
C++ build problem on IRIX
P
roduct
:
kmail
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2005-03-03 12:15
Last Changed:
2007-09-14 12:17:01
Version: (using KDE KDE 3.3.2) Installed from: Compiled From Sources Compiler: MIPSpro Compilers: Version 7.4.3m OS: Irix I'm encountering the following build problem with the SGI C++ compiler on IRIX for kmail from kdepim-3.3.2: CC -DHAVE_CONFIG_H -I. -I. -I.. -I../libkdenetwork -I../libkdepim -I../libkpimidentities -I../libksieve -I../mimelib -I../certmanager/lib -I.. -I/opt/TWWfsw/libgpgme10/include -I/opt/TWWfsw/libgpgerror10/include -I/opt/TWWfsw/kde33/include -I/opt/TWWfsw/libqt33/include -I/opt/TWWfsw/jpeg/include -I/opt/TWWfsw/libpng12/include -I/opt/TWWfsw/libtiff35/include -I/opt/TWWfsw/libmng10/include -I/opt/TWWfsw/zlib11/include -DQT_THREAD_SUPPORT -DNDEBUG -DNO_DEBUG -Wl,-woff,84 -Wl,-woff,85 -woff 1429 -use_readonly_const -G0 -rdata_shared -DEBUG:optimize_space=ON -mips4 -r5000 -O1 -OPT:Olimit=0 -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c urlhandlermanager.cpp -DPIC -o .libs/urlhandlermanager.o cc-1278 CC: ERROR File = urlhandlermanager.cpp, Line = 155 No instance of function template "std::for_each" matches the argument list. The argument types are: (QValueVector<const KMail::Interface::BodyPartURLHandler *>::iterator, QValueVector<const KMail::Interface::BodyPartURLHandler *>::iterator, <unknown-type>). for_each( mHandlers.begin(), mHandlers.end(), ^ cc-1278 CC: ERROR File = urlhandlermanager.cpp, Line = 255 No instance of function template "std::for_each" matches the argument list. The argument types are: (QValueVector<const KMail::URLHandler *>::iterator, QValueVector<const KMail::URLHandler *>::iterator, <unknown-type>). for_each( mHandlers.begin(), mHandlers.end(), ^
Comment
#1
David Faure 2005-03-03 14:21:53
Was your Qt built with STL support enabled?
Comment
#2
The Written Word 2005-03-03 14:26:19
Yes, we built with -stl. I've attached a patch that worked around the issue for us by using something similar to what kdepim-3.2.3 used for Delete. Does it make sense (I'm not a C++ guy)?
Comment
#3
The Written Word 2005-03-03 14:26:44
Created an attachment (id=9949)
[details]
Workaround
Comment
#4
David Faure 2005-03-03 18:31:22
CVS commit by faure: Patch from #100725 to fix build problem on IRIX. Approved by Marc Mutz. BUG: 100725 M +2 -1 rulewidgethandlermanager.cpp 1.15 M +3 -3 stl_util.h 1.4 M +2 -2 urlhandlermanager.cpp 1.19 --- kdepim/kmail/rulewidgethandlermanager.cpp #1.14:1.15 @@ -210,5 +210,6 @@ KMail::RuleWidgetHandlerManager::RuleWid KMail::RuleWidgetHandlerManager::~RuleWidgetHandlerManager() { - for_each( mHandlers.begin(), mHandlers.end(), DeleteAndSetToZero<RuleWidgetHandler> ); + for_each( mHandlers.begin(), mHandlers.end(), + DeleteAndSetToZero<RuleWidgetHandler>() ); } --- kdepim/kmail/stl_util.h #1.3:1.4 @@ -34,7 +34,7 @@ template <typename T> -static inline void DeleteAndSetToZero( const T* & t ) { - delete t; t = 0; -} +struct DeleteAndSetToZero { + void operator()( const T * t ) { delete t; t = 0; } +}; template <typename T> --- kdepim/kmail/urlhandlermanager.cpp #1.18:1.19 @@ -154,5 +154,5 @@ private: KMail::URLHandlerManager::BodyPartURLHandlerManager::~BodyPartURLHandlerManager() { for_each( mHandlers.begin(), mHandlers.end(), - DeleteAndSetToZero<Interface::BodyPartURLHandler> ); + DeleteAndSetToZero<Interface::BodyPartURLHandler>() ); } @@ -254,5 +254,5 @@ KMail::URLHandlerManager::URLHandlerMana KMail::URLHandlerManager::~URLHandlerManager() { for_each( mHandlers.begin(), mHandlers.end(), - DeleteAndSetToZero<URLHandler> ); + DeleteAndSetToZero<URLHandler>() ); }
Comment
#5
David Faure 2005-03-03 18:49:39
CVS commit by faure: Add missing &... CCBUG: 100725 M +1 -1 stl_util.h 1.3.2.2 --- kdepim/kmail/stl_util.h #1.3.2.1:1.3.2.2 @@ -35,5 +35,5 @@ template <typename T> struct DeleteAndSetToZero { - void operator()( const T * t ) { delete t; t = 0; } + void operator()( const T * & t ) { delete t; t = 0; } };
P
latform
:
Compiled Sources
O
S
:
IRIX
K
eywords
:
People
Reporter
:
The Written Word
Assigned To
:
kdepim bugs
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Workaround
(1.69 KB, patch)
2005-03-03 14:26
,
The Written Word
Details
View All
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In