Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -8306,23 +8306,14 @@ void Application::saveNextPhysicsStats(QString filename) { · 8305 unmodified lines | ||
| 8306 | 8306 | _physicsEngine->saveNextPhysicsStats(filename); |
| 8307 | 8307 | } |
| 8308 | 8308 | |
| 8309 | −void Application::copyAddress() { | |
| 8310 | − if (QThread::currentThread() != thread()) { | |
| 8311 | − QMetaObject::invokeMethod(this, "copyAddress"); | |
| 8309 | +void Application::copyToClipboard(const QString& text) { | |
| 8310 | + if (QThread::currentThread() != qApp->thread()) { | |
| 8311 | + QMetaObject::invokeMethod(this, "copyToClipboard"); | |
| 8312 | 8312 | return; |
| 8313 | 8313 | } |
| 8314 | 8314 | |
| 8315 | 8315 | // assume that the address is being copied because the user wants a shareable address |
| 8316 | − QApplication::clipboard()->setText(QString("copyAddress worked!")); | |
| 8317 | −} | |
| 8318 | − | |
| 8319 | −void Application::copyPath() { | |
| 8320 | − if (QThread::currentThread() != thread()) { | |
| 8321 | − QMetaObject::invokeMethod(this, "copyPath"); | |
| 8322 | − return; | |
| 8323 | − } | |
| 8324 | − | |
| 8325 | − QApplication::clipboard()->setText(QString("copyPath worked!")); | |
| 8316 | + QApplication::clipboard()->setText(text); | |
| 8326 | 8317 | } |
| 8327 | 8318 | |
| 8328 | 8319 | #if defined(Q_OS_ANDROID) |