mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
disabled drag&drop move action for importing new comics
This commit is contained in:
parent
093d932104
commit
5cd03bc72f
@ -19,7 +19,7 @@ void ComicsView::dragEnterEvent(QDragEnterEvent *event)
|
|||||||
{
|
{
|
||||||
QList<QUrl> urlList;
|
QList<QUrl> urlList;
|
||||||
|
|
||||||
if (event->mimeData()->hasUrls())
|
if (event->mimeData()->hasUrls() && event->dropAction() == Qt::CopyAction)
|
||||||
{
|
{
|
||||||
urlList = event->mimeData()->urls();
|
urlList = event->mimeData()->urls();
|
||||||
QString currentPath;
|
QString currentPath;
|
||||||
@ -40,7 +40,7 @@ void ComicsView::dropEvent(QDropEvent *event)
|
|||||||
{
|
{
|
||||||
QLOG_DEBUG() << "drop" << event->dropAction();
|
QLOG_DEBUG() << "drop" << event->dropAction();
|
||||||
|
|
||||||
bool validAction = event->dropAction() == Qt::CopyAction || event->dropAction() & Qt::MoveAction;
|
bool validAction = event->dropAction() == Qt::CopyAction;// || event->dropAction() & Qt::MoveAction; TODO move
|
||||||
|
|
||||||
if(validAction)
|
if(validAction)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ void EmptyFolderWidget::dragEnterEvent(QDragEnterEvent *event)
|
|||||||
{
|
{
|
||||||
QList<QUrl> urlList;
|
QList<QUrl> urlList;
|
||||||
|
|
||||||
if (event->mimeData()->hasUrls())
|
if (event->mimeData()->hasUrls() && event->dropAction() == Qt::CopyAction)
|
||||||
{
|
{
|
||||||
urlList = event->mimeData()->urls();
|
urlList = event->mimeData()->urls();
|
||||||
QString currentPath;
|
QString currentPath;
|
||||||
@ -131,7 +131,7 @@ void EmptyFolderWidget::dropEvent(QDropEvent *event)
|
|||||||
{
|
{
|
||||||
QLOG_DEBUG() << "drop in emptyfolder" << event->dropAction();
|
QLOG_DEBUG() << "drop in emptyfolder" << event->dropAction();
|
||||||
|
|
||||||
bool validAction = event->dropAction() == Qt::CopyAction || event->dropAction() & Qt::MoveAction;
|
bool validAction = event->dropAction() == Qt::CopyAction; // || event->dropAction() & Qt::MoveAction; TODO move
|
||||||
|
|
||||||
if(validAction)
|
if(validAction)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ void YACReaderFoldersView::dragEnterEvent(QDragEnterEvent *event)
|
|||||||
|
|
||||||
QList<QUrl> urlList;
|
QList<QUrl> urlList;
|
||||||
|
|
||||||
if (event->mimeData()->hasUrls())
|
if (event->mimeData()->hasUrls() && event->dropAction() == Qt::CopyAction)
|
||||||
{
|
{
|
||||||
urlList = event->mimeData()->urls();
|
urlList = event->mimeData()->urls();
|
||||||
QString currentPath;
|
QString currentPath;
|
||||||
@ -55,7 +55,7 @@ void YACReaderFoldersView::dropEvent(QDropEvent *event)
|
|||||||
|
|
||||||
QLOG_DEBUG() << "drop on tree" << event->dropAction();
|
QLOG_DEBUG() << "drop on tree" << event->dropAction();
|
||||||
|
|
||||||
bool validAction = event->dropAction() == Qt::CopyAction || event->dropAction() & Qt::MoveAction;
|
bool validAction = event->dropAction() == Qt::CopyAction; // || event->dropAction() & Qt::MoveAction; TODO move
|
||||||
|
|
||||||
if(validAction)
|
if(validAction)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user