QTfrontend/game.cpp
changeset 10851 f25dad9c3136
parent 10850 c76ea22ea249
child 11046 47a8c19ecb60
equal deleted inserted replaced
10850:c76ea22ea249 10851:f25dad9c3136
   209     switch(msg.at(1))
   209     switch(msg.at(1))
   210     {
   210     {
   211         case '?':
   211         case '?':
   212         {
   212         {
   213             SendIPC("!");
   213             SendIPC("!");
   214             break;
       
   215         }
       
   216         case 'Y':
       
   217         {
       
   218             // copy string to clipboard
       
   219             QApplication::clipboard()->setText(QString::fromUtf8(msg.mid(2)));
       
   220             break;
       
   221         }
       
   222         case 'P':
       
   223         {
       
   224             // paste clipboard to game
       
   225             SendIPC(QString("P").toAscii() + QApplication::clipboard()->text().toUtf8().left(254).replace('\n', ' '));
       
   226             break;
   214             break;
   227         }
   215         }
   228         case 'C':
   216         case 'C':
   229         {
   217         {
   230             switch (gameType)
   218             switch (gameType)
   270                 "If this keeps happening, please click the '%1' button in the main menu!\n\n"
   258                 "If this keeps happening, please click the '%1' button in the main menu!\n\n"
   271                 "Last two engine messages:\n%2")
   259                 "Last two engine messages:\n%2")
   272                 .arg("Feedback")
   260                 .arg("Feedback")
   273                 .arg(QString::fromUtf8(msg.mid(2).left(size - 4))));
   261                 .arg(QString::fromUtf8(msg.mid(2).left(size - 4))));
   274             return;
   262             return;
       
   263         }
       
   264         case 'y':
       
   265         {
       
   266             // copy string to clipboard
       
   267             QApplication::clipboard()->setText(QString::fromUtf8(msg.mid(2)));
       
   268             break;
       
   269         }
       
   270         case 'Y':
       
   271         {
       
   272             // paste clipboard to game
       
   273             SendIPC(QString("Y").toAscii() + QApplication::clipboard()->text().toUtf8().left(250).replace('\n', ' '));
       
   274             break;
   275         }
   275         }
   276         case 'i':
   276         case 'i':
   277         {
   277         {
   278             emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
   278             emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
   279             break;
   279             break;