mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Fix all compilation issues after enabling QT_DISABLE_DEPRECATED_UP_TO
This commit is contained in:
@ -198,7 +198,7 @@ void bindActionToNSToolbarItem(QAction *action, NSToolbarItem *toolbarItem, cons
|
||||
NSMutableArray *array = [[NSMutableArray alloc] init];
|
||||
|
||||
QList<QMacToolBarItem *> items = mytoolbar->items();
|
||||
foreach (const QMacToolBarItem * item, items) {
|
||||
for (const auto *item : items) {
|
||||
[array addObject : item->nativeToolBarItem().itemIdentifier];
|
||||
}
|
||||
return array;
|
||||
|
||||
@ -407,7 +407,7 @@ void StarEditor::leaveEvent(QEvent *event)
|
||||
void StarEditor::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
int star = starAtPosition(event->x());
|
||||
int star = starAtPosition(event->position().x());
|
||||
|
||||
if (star != myStarRating.starCount() && star != -1) {
|
||||
myStarRating.setStarCount(star);
|
||||
|
||||
@ -66,9 +66,10 @@ void YACReaderTreeView::dragMoveEvent(QDragMoveEvent *event)
|
||||
QTreeView::dragMoveEvent(event);
|
||||
|
||||
// fix for drop auto expand
|
||||
QModelIndex underMouse = indexAt(event->pos());
|
||||
auto point = event->position().toPoint();
|
||||
QModelIndex underMouse = indexAt(point);
|
||||
if (underMouse.isValid()) {
|
||||
expandPos = event->pos();
|
||||
expandPos = point;
|
||||
connect(&expandTimer, &QTimer::timeout, this, &YACReaderTreeView::expandCurrent);
|
||||
expandTimer.setSingleShot(true);
|
||||
expandTimer.start(500);
|
||||
|
||||
Reference in New Issue
Block a user