QTfrontend/game.cpp
changeset 11383 d3b603323b2b
parent 11364 b0df3f2fcafc
child 11888 618d99523933
equal deleted inserted replaced
11381:437a60995fe1 11383:d3b603323b2b
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    17  */
    17  */
    18 
    18 
    19 #include <QApplication>
    19 #include <QApplication>
    20 #include <QClipboard>
       
    21 
    20 
    22 #include <QString>
    21 #include <QString>
    23 #include <QCheckBox>
    22 #include <QCheckBox>
    24 #include <QByteArray>
    23 #include <QByteArray>
    25 #include <QUuid>
    24 #include <QUuid>
   258                 "If this keeps happening, please click the '%1' button in the main menu!\n\n"
   257                 "If this keeps happening, please click the '%1' button in the main menu!\n\n"
   259                 "Last two engine messages:\n%2")
   258                 "Last two engine messages:\n%2")
   260                 .arg("Feedback")
   259                 .arg("Feedback")
   261                 .arg(QString::fromUtf8(msg.mid(2).left(size - 4))));
   260                 .arg(QString::fromUtf8(msg.mid(2).left(size - 4))));
   262             return;
   261             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         }
   262         }
   276         case 'i':
   263         case 'i':
   277         {
   264         {
   278             emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
   265             emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
   279             break;
   266             break;