Bug 338124 - plasma-nm-0.9.3.4 fails to build (openvpn.h:46:22: error: 'QTextStream' has not been declared)
Summary: plasma-nm-0.9.3.4 fails to build (openvpn.h:46:22: error: 'QTextStream' has n...
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3.4
Platform: Exherbo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-08 12:28 UTC by Timo Gurr
Modified: 2014-08-08 12:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
0001-Add-missing-include-of-QTextStream.patch (573 bytes, patch)
2014-08-08 12:56 UTC, Timo Gurr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Gurr 2014-08-08 12:28:06 UTC
Same error as someone else also reported on the blog:
http://grulja.wordpress.com/2014/08/07/plasma-nm-0-9-3-4-is-out/

In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:22: error: 'QTextStream' has not been declared
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
                      ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp: In member function 'virtual NMVariantMapMap OpenVpnUiPlugin::importConnectionSettings(const QString&)':
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:490:112: error: no matching function for call to 'OpenVpnUiPlugin::saveFile(QTextStream&, QLatin1String, const QString&, const char [7])'
             const QString caAbsolutePath = saveFile(in, QLatin1String(END_KEY_CA_TAG), connectionName, "ca.crt");
                                                                                                                ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:490:112: note: candidate is:
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note:   no known conversion for argument 1 from 'QTextStream' to 'int&'
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:496:118: error: no matching function for call to 'OpenVpnUiPlugin::saveFile(QTextStream&, QLatin1String, const QString&, const char [9])'
             const QString certAbsolutePath = saveFile(in, QLatin1String(END_KEY_CERT_TAG), connectionName, "cert.crt");
                                                                                                                      ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:496:118: note: candidate is:
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note:   no known conversion for argument 1 from 'QTextStream' to 'int&'
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:502:119: error: no matching function for call to 'OpenVpnUiPlugin::saveFile(QTextStream&, QLatin1String, const QString&, const char [12])'
             const QString keyAbsolutePath = saveFile(in, QLatin1String(END_KEY_KEY_TAG), connectionName, "private.key");
                                                                                                                       ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:502:119: note: candidate is:
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note:   no known conversion for argument 1 from 'QTextStream' to 'int&'
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:508:124: error: no matching function for call to 'OpenVpnUiPlugin::saveFile(QTextStream&, QLatin1String, const QString&, const char [11])'
             const QString secretAbsolutePath = saveFile(in, QLatin1String(END_KEY_SECRET_TAG), connectionName, "secret.key");
                                                                                                                            ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:508:124: note: candidate is:
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note:   no known conversion for argument 1 from 'QTextStream' to 'int&'
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:519:125: error: no matching function for call to 'OpenVpnUiPlugin::saveFile(QTextStream&, QLatin1String, const QString&, const char [13])'
             const QString tlsAuthAbsolutePath = saveFile(in, QLatin1String(END_TLS_AUTH_TAG), connectionName, "tls_auth.key");
                                                                                                                             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:519:125: note: candidate is:
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: note:   no known conversion for argument 1 from 'QTextStream' to 'int&'
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp: At global scope:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:607:9: error: prototype for 'QString OpenVpnUiPlugin::saveFile(QTextStream&, const QString&, const QString&, const QString&)' does not match any in class 'OpenVpnUiPlugin'
 QString OpenVpnUiPlugin::saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName)
         ^
In file included from /var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.cpp:24:0:
/var/tmp/paludis/build/kde-plasma-nm-0.9.3.4/work/plasma-nm-0.9.3.4/vpn/openvpn/openvpn.h:46:13: error: candidate is: QString OpenVpnUiPlugin::saveFile(int&, const QString&, const QString&, const QString&)
     QString saveFile(QTextStream &in, const QString &endTag, const QString &connectionName, const QString &fileName);
             ^
vpn/openvpn/CMakeFiles/plasmanetworkmanagement_openvpnui.dir/build.make:95: recipe for target 'vpn/openvpn/CMakeFiles/plasmanetworkmanagement_openvpnui.dir/openvpn.cpp.o' failed


Installed Qt4 version is 4.8.6 and the previous release of plasma-nm (0.9.3.3) builds fine.
Comment 1 Jan Grulich 2014-08-08 12:44:07 UTC
Can you please try to add #include <QTextStream> to vpn/openvpn/openvpn.h?
Comment 2 Timo Gurr 2014-08-08 12:56:43 UTC
That seems to fix it, thanks! It compiled fine now. Attached is a git-format patch incorporating the change.
Comment 3 Timo Gurr 2014-08-08 12:56:59 UTC
Created attachment 88164 [details]
0001-Add-missing-include-of-QTextStream.patch
Comment 4 Jan Grulich 2014-08-08 12:59:48 UTC
Git commit 992a1826f870e8c095414351e2e9dcc044145786 by Jan Grulich.
Committed on 08/08/2014 at 12:59.
Pushed by grulich into branch '0.9.3'.

Add missing include to fix build on some systems

M  +1    -0    vpn/openvpn/openvpn.h

http://commits.kde.org/plasma-nm/992a1826f870e8c095414351e2e9dcc044145786