Version: (using Devel) Installed from: Compiled sources Compiler: gcc 3.4.6 OS: Linux hi, I reported such issus some days ago. http://bugs.kde.org/show_bug.cgi?id=161877 and r806698 fix that. but that fix caused another two compilation errors, just the same kind of error like the previous bug. this time, I uploaded a patch written by myself. It will move these functions from protected to public. I passed the compilation after using the patch. output info when trying to build svn807659: [nihui@MagicLinux plasma]$ make -j6 [ 0%] [ 0%] [ 0%] [ 0%] [ 0%] [ 0%] Building CXX object libs/plasma/CMakeFiles/plasma.dir/corona.o Building CXX object libs/plasma/CMakeFiles/plasma.dir/dataengine.o Building CXX object libs/plasma/CMakeFiles/plasma.dir/delegate.o Building CXX object libs/plasma/CMakeFiles/plasma.dir/runnermanager.o Building CXX object libs/plasma/CMakeFiles/plasma.dir/view.o Building CXX object libs/plasma/CMakeFiles/plasma.dir/scripting/appletscript.o /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/runnermanager.cpp: In member function `void Plasma::RunnerManager::Private::loadAll()': /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/abstractrunner.h:192: error: `Plasma::AbstractRunner::AbstractRunner(QObject*, const QString&)' is protected /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/runnermanager.cpp:256: error: within this context /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/dataengine.cpp: In member function `void Plasma::DataEngine::Private::internalUpdateSource(Plasma::DataContainer*)': /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/datacontainer.h:127: error: `uint Plasma::DataContainer::timeSinceLastUpdate() const' is protected /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/dataengine.cpp:444: error: within this context /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/datacontainer.h:137: error: `void Plasma::DataContainer::setNeedsUpdate(bool)' is protected /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/dataengine.cpp:450: error: within this context make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/runnermanager.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/delegate.cpp: In member function `virtual void Plasma::Delegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const': /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/delegate.cpp:326: warning: converting to `int' from `double' make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/dataengine.o] Error 1 /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/corona.cpp: In member function `Plasma::Containment* Plasma::Corona::Private::addContainment(const QString&, const QVariantList&, uint, bool)': /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/applet.h:556: error: `void Plasma::Applet::setFailedToLaunch(bool, const QString&)' is protected /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/corona.cpp:153: error: within this context /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/applet.h:602: error: `void Plasma::Applet::setIsContainment(bool)' is protected /work/people/nihui/mBuild/BUILD/kdebase-workspace-4.0.73/libs/plasma/corona.cpp:157: error: within this context make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/corona.o] Error 1 make[1]: *** [libs/plasma/CMakeFiles/plasma.dir/all] Error 2 make: *** [all] Error 2
Created attachment 24760 [details] fix the errors when using gcc3 move these functions to public.
4.0.80(KDE 4.1 beta1) this problem seems to disappear ;)
sorry for my last change of this bug report. I have to say that this problem still persists in the last svn trunk snapshot(4.0.82). So I reopen this. my patch can be applied to recover these errors. ps: amarok2 is also affected since it use the same code. nihui @ #kde-devel #plasma ........
4.0.83(svn 821791) errors still exist... but after applying the patch, it works. Any responses? (using make -j4) [ 75%] Building CXX object libs/plasma/CMakeFiles/plasma.dir/dataenginemanager.o /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/dataengine.cpp: In member function `void Plasma::DataEngine::Private::internalUpdateSource(Plasma::DataContainer*)': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/datacontainer.h:127: error: `uint Plasma::DataContainer::timeSinceLastUpdate() const' is protected /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/dataengine.cpp:451: error: within this context /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/datacontainer.h:137: error: `void Plasma::DataContainer::setNeedsUpdate(bool)' is protected /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/dataengine.cpp:457: error: within this context /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/dataengine.cpp: At global scope: /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/dataengine.cpp:70: warning: unused parameter 'source' make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/dataengine.o] 错误 1 make[2]: *** 正在等待未完成的任务.... /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/corona.cpp: In member function `Plasma::Containment* Plasma::Corona::Private::addContainment(const QString&, const QVariantList&, uint, bool)': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/applet.h:591: error: `void Plasma::Applet::setFailedToLaunch(bool, const QString&)' is protected /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/corona.cpp:135: error: within this context /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/applet.h:642: error: `void Plasma::Applet::setIsContainment(bool)' is protected /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/corona.cpp:139: error: within this context make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/corona.o] 错误 1 /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `QPoint Plasma::Containment::effectiveScreenPos() const': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:646: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:649: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:649: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:652: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:655: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:655: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `KActionCollection& Plasma::Containment::Private::actions()': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/applet.h:746: error: `Plasma::Applet::Private* const Plasma::Applet::d' is private /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:943: error: within this context /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `void Plasma::Containment::Private::positionContainment()': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:1336: warning: converting to `int' from `qreal' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:1360: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/containment.o] 错误 1 make[1]: *** [libs/plasma/CMakeFiles/plasma.dir/all] 错误 2 make: *** [all] 错误 2 (using make) [ 41%] Building CXX object libs/plasma/CMakeFiles/plasma.dir/containment.o /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `QPoint Plasma::Containment::effectiveScreenPos() const': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:646: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:649: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:649: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:652: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:655: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:655: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `KActionCollection& Plasma::Containment::Private::actions()': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/applet.h:746: error: `Plasma::Applet::Private* const Plasma::Applet::d' is private /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:943: error: within this context /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp: In member function `void Plasma::Containment::Private::positionContainment()': /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:1336: warning: converting to `int' from `qreal' /work/people/nihui/mBuild/SOURCES/kdebase-workspace-4.0.83/libs/plasma/containment.cpp:1360: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)' make[2]: *** [libs/plasma/CMakeFiles/plasma.dir/containment.o] 错误 1 make[1]: *** [libs/plasma/CMakeFiles/plasma.dir/all] 错误 2 make: *** [all] 错误 2
Created attachment 25451 [details] fix build r821791 update patch patch updated to r821791.
Two notes: a) I don't think the patch is correct, I doubt the author of the code wants to see these functions as public. b) this is the wrong place for compile errors. You should send this to panel-devel@kde.org
To Andreas Pakulat, a) I created the patch just for passing the compilation, and I hadn't considered more. Since these functions were moved to private during the Plasma api review, I'm certainly aware of that the author of the code should have his reasons and private functions should have their advantages. If my patch isn't correct, then please tell me what should I do with these errors. Better solution is always welcome. b) One of the plasma team members suggested me to report these problems in a separate bug report.(see comment #5 https://bugs.kde.org/show_bug.cgi?id=161877) Besides, each comment in the bug reports related to plasma will be sent to panel-devel mailinglist automatically. thanks anyway.
ad a) I don't have any idea about the code, so I can't help there. But having a quick look at the code I wonder wether adding a "friend class DataEngine::Private;" line under the friend class declaration helps? ad b) I thought the general rule is that compilation problems shouldn't be here, but I couldn't find a page saying so. So maybe thats not a general rule. Anyway, comments to bugreports for plasma aren't automatically sent to the panel-devel list anymore as that caused too much noise there. so only stuff assigned to "Plasma Dev Team" like this bugreport will.
yes, this patch is wrong. if you want to fix it properly, then go through and change all the classes called Private to <ClassName>Private, move them outside the class declaration (so they aren't inner classes) and change all ClassName::Private to ClassNamePrivate. while i'll certainly accept such a patch, i'm not actually interested in doing this work myself or by any of the other plasma devs who already have enough to do. use a decent compiler.
so, do you mean lib/plasma *won't* be able to be compiled when using old gcc without a patch? and KDE 4.1.x *won't* be able to be compiled either.... while KDE 4.0.x can. :| If that's true, then I think you devs should announce this info to the release-team and drop the "gcc 3.x" in "compilation requirement" section on the techbase page. gcc 3.x is too old to compile plasma in KDE 4.1 ~~
that's what i'm saying. unless someone who actually uses gcc 3.x bothers to do the work necessary, it won't happen. i've heard of this issue a number of times and yet the people who report it won't spend the couple of hours it would take to fix it for everyone else as well. free software is about scratching your itches, not me scratching yours. and in this case, using a compiler released in the last year or two fixes the problem so i'm not going to put this on our TODO. if you care about it, fix it.
Comment on attachment 25451 [details] fix build r821791 update patch wrong
4.0.85 snapshot: seems to have been fixed. http://websvn.kde.org/?view=rev&revision=826893 Thank you all the devs !