summaryrefslogtreecommitdiffstats
path: root/examples/draganddrop
diff options
context:
space:
mode:
Diffstat (limited to 'examples/draganddrop')
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.cpp6
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp4
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp
index 70d838a..fb54ffc 100644
--- a/examples/draganddrop/dropsite/dropsitewindow.cpp
+++ b/examples/draganddrop/dropsite/dropsitewindow.cpp
@@ -119,10 +119,8 @@ void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData)
text = mimeData->html().simplified();
} else if (format == "text/uri-list") {
QList<QUrl> urlList = mimeData->urls();
- for (int i = 0; i < urlList.size() && i < 32; ++i) {
- QString url = urlList.at(i).path();
- text.append(url + " ");
- }
+ for (int i = 0; i < urlList.size() && i < 32; ++i)
+ text.append(urlList[i].toString() + " ");
} else {
QByteArray data = mimeData->data(format);
for (int i = 0; i < data.size() && i < 32; ++i) {
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
index db8994b..c6cef0e 100644
--- a/examples/draganddrop/puzzle/mainwindow.cpp
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -120,10 +120,10 @@ void MainWindow::setupMenus()
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
QAction *openAction = fileMenu->addAction(tr("&Open..."));
- openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ openAction->setShortcuts(QKeySequence::Open);
QAction *exitAction = fileMenu->addAction(tr("E&xit"));
- exitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+ exitAction->setShortcuts(QKeySequence::Quit);
QMenu *gameMenu = menuBar()->addMenu(tr("&Game"));