--- a/QTfrontend/game.cpp Fri Mar 06 21:24:21 2015 +0100
+++ b/QTfrontend/game.cpp Sun Mar 08 01:04:41 2015 +0100
@@ -16,6 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <QApplication>
+#include <QClipboard>
+
#include <QString>
#include <QCheckBox>
#include <QByteArray>
@@ -210,6 +213,18 @@
SendIPC("!");
break;
}
+ case 'Y':
+ {
+ // copy string to clipboard
+ QApplication::clipboard()->setText(QString::fromUtf8(msg.mid(2)));
+ break;
+ }
+ case 'P':
+ {
+ // paste clipboard to game
+ SendIPC(QString("P").toAscii() + QApplication::clipboard()->text().toUtf8().left(254).replace('\n', ' '));
+ break;
+ }
case 'C':
{
switch (gameType)