[Kde-pim] Akonadi-1.2.1 build error

Ingo Klöcker kloecker at kde.org
Fri Oct 23 16:53:36 BST 2009


On Friday 23 October 2009, Sagara Wijetunga wrote:
> Ingo, thanks for the info. I'm not good in C++ but I'm a good C
> programmer. With help from you guys I can proceed and find where the
> error is.
>
> 1. /usr/bin/automoc4 --help, /usr/bin/automoc4 --version does not
> print anything. It seems these are implemented using cout:
> if ((args[1]=="--help") || (args[1]=="-h")) {
>         printUsage(args[0]);
>
>        ::exit(0);
>
>         }
>         else if (args[1]=="--version") {
>         printVersion();
>
>        ::exit(0);
>
>         }
>
> void AutoMoc::printUsage(const QString &path)
> {
>     cout << "Usage: " << path << " <outfile> <srcdir> <builddir> <moc
> executable> <cmake executable> [--touch]" << endl;
> }
>
> void AutoMoc::printVersion()
> {
>     cout << "automoc4 " << AUTOMOC4_VERSION << endl;
> }

That's weird. This works here on openSUSE Linux.


> 2. All dotFiles.readLine() calls are of following type:
> QByteArray line = dotFiles.readLine();
>
> But the problematic one is:
> const QByteArray &line = dotFiles.readLine();
>
> Not sure whether the "&line" is correct?

Hmm, try replacing it with
const QByteArray line = dotFiles.readLine();

It shouldn't make a difference though.


> 3. If you could help me with how to write a qDebug() to display the
> args[1] and line, I can check what's it reading and further narrow
> down the issue.

You can use qDebug() just as you would use cout or cerr. There are quite 
a few occurrences of qDebug() in the cpp file which you can look at for 
reference.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20091023/b1da2f85/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list