diff --git a/calendar-client/src/customWidget/jobtypelistview.cpp b/calendar-client/src/customWidget/jobtypelistview.cpp index d5b28d5b..ed8b5d3e 100644 --- a/calendar-client/src/customWidget/jobtypelistview.cpp +++ b/calendar-client/src/customWidget/jobtypelistview.cpp @@ -227,7 +227,6 @@ void JobTypeListView::slotImportScheduleType() KCalendarCore::ICalFormat icalformat; QTimeZone timezone = QDateTime::currentDateTime().timeZone(); KCalendarCore::MemoryCalendar::Ptr cal(new KCalendarCore::MemoryCalendar(timezone)); - auto ok = icalformat.load(cal, filename); auto typeID = cal->nonKDECustomProperty("X-DDE-CALENDAR-TYPE-ID"); auto typeName = cal->nonKDECustomProperty("X-DDE-CALENDAR-TYPE-NAME"); auto typeColor = cal->nonKDECustomProperty("X-DDE-CALENDAR-TYPE-COLOR"); diff --git a/calendar-client/src/customWidget/scheduleview.cpp b/calendar-client/src/customWidget/scheduleview.cpp index b3dc2c64..2284340b 100644 --- a/calendar-client/src/customWidget/scheduleview.cpp +++ b/calendar-client/src/customWidget/scheduleview.cpp @@ -360,7 +360,7 @@ void CScheduleView::resizeEvent(QResizeEvent *event) void CScheduleView::wheelEvent(QWheelEvent *e) { - if (e->angleDelta().x() != 0 ) { + if (e->angleDelta().x() != 0) { emit signalAngleDelta(e->angleDelta().x()); } } diff --git a/calendar-client/src/main.cpp b/calendar-client/src/main.cpp index b481e762..69e06238 100644 --- a/calendar-client/src/main.cpp +++ b/calendar-client/src/main.cpp @@ -81,8 +81,6 @@ int main(int argc, char *argv[]) DLogManager::registerConsoleAppender(); DLogManager::registerFileAppender(); DLogManager::registerJournalAppender(); - //获取应用配置 - DApplicationSettings applicationset(app); //为了与老版本配置兼容 Calendarmainwindow ww(viewtype - 1); ExportedInterface einterface(&ww); diff --git a/calendar-client/src/view/graphicsItem/cscenebackgrounditem.cpp b/calendar-client/src/view/graphicsItem/cscenebackgrounditem.cpp index 18fdb126..a596d93f 100644 --- a/calendar-client/src/view/graphicsItem/cscenebackgrounditem.cpp +++ b/calendar-client/src/view/graphicsItem/cscenebackgrounditem.cpp @@ -7,6 +7,7 @@ #include #include #include +#include CSceneBackgroundItem::CSceneBackgroundItem(ItemOnView view, QGraphicsItem *parent) : CFocusItem(parent) @@ -93,7 +94,7 @@ void CSceneBackgroundItem::updateShowItem() m_item.append(item); } } - qSort(m_item.begin(), m_item.end(), compareItemData); + std::sort(m_item.begin(), m_item.end(), compareItemData); updateCurrentItemShow(); } diff --git a/calendar-client/src/widget/calendarmainwindow.cpp b/calendar-client/src/widget/calendarmainwindow.cpp index 8029d2ef..0bbffc04 100644 --- a/calendar-client/src/widget/calendarmainwindow.cpp +++ b/calendar-client/src/widget/calendarmainwindow.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -97,11 +98,11 @@ Calendarmainwindow::Calendarmainwindow(int index, QWidget *w) connect(viewshortcut, SIGNAL(activated()), this, SLOT(slotViewShortcut())); setTitlebarShadowEnabled(true); - //获取桌面窗口大小 - QDesktopWidget *desktopwidget = QApplication::desktop(); //若分辨率改变则重新设置最大尺寸 - connect(desktopwidget, &QDesktopWidget::resized, this, &Calendarmainwindow::slotSetMaxSize); - slotSetMaxSize(); + const auto screens = QGuiApplication::screens(); + for (QScreen *screen : screens) { + connect(screen, &QScreen::geometryChanged, this, &Calendarmainwindow::slotSetMaxSize); + } //兼容以前的配置信息 if (CConfigSettings::getInstance()->contains("base.geometry")) { @@ -789,9 +790,8 @@ void Calendarmainwindow::slotDeleteitem() * @brief Calendarmainwindow::slotSetMaxSize 根据屏幕分辨率调整窗口最大尺寸 * @param size */ -void Calendarmainwindow::slotSetMaxSize(int size) +void Calendarmainwindow::slotSetMaxSize() { - Q_UNUSED(size); //获取屏幕大小 QSize deskSize = QApplication::desktop()->size(); //设置最大尺寸为屏幕尺寸 diff --git a/calendar-client/src/widget/calendarmainwindow.h b/calendar-client/src/widget/calendarmainwindow.h index 82ff66c3..c48a3db1 100644 --- a/calendar-client/src/widget/calendarmainwindow.h +++ b/calendar-client/src/widget/calendarmainwindow.h @@ -99,7 +99,7 @@ private slots: //快捷键删除选中日程 void slotDeleteitem(); //设置最大大小 - void slotSetMaxSize(int size = 0); + void slotSetMaxSize(); void slotSearchFocusSwitch(); //帐户侧边栏状态发生改变事件 void slotSidebarStatusChange(bool); diff --git a/calendar-client/src/widget/dayWidget/daymonthview.cpp b/calendar-client/src/widget/dayWidget/daymonthview.cpp index 8a87dfb6..370e50ab 100644 --- a/calendar-client/src/widget/dayWidget/daymonthview.cpp +++ b/calendar-client/src/widget/dayWidget/daymonthview.cpp @@ -383,7 +383,7 @@ void CDayMonthView::paintEvent(QPaintEvent *e) QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); // 反锯齿; painter.save(); - painter.setBrush(aniPa.background()); + painter.setBrush(aniPa.window()); painter.setPen(Qt::NoPen); QPainterPath painterPath; painterPath.moveTo(0, 0); diff --git a/calendar-client/src/widget/monthWidget/monthdayview.cpp b/calendar-client/src/widget/monthWidget/monthdayview.cpp index 2fbacf6a..0bb0e6bf 100644 --- a/calendar-client/src/widget/monthWidget/monthdayview.cpp +++ b/calendar-client/src/widget/monthWidget/monthdayview.cpp @@ -82,7 +82,7 @@ void CMonthDayView::setSearchflag(bool flag) void CMonthDayView::wheelEvent(QWheelEvent *e) { //如果滚动为左右则触发信号 - if (e->angleDelta().x() != 0 ) { + if (e->angleDelta().x() != 0) { emit signalAngleDelta(e->angleDelta().x()); } else { emit signalAngleDelta(e->angleDelta().y()); diff --git a/calendar-client/src/widget/weekWidget/weekheadview.cpp b/calendar-client/src/widget/weekWidget/weekheadview.cpp index 5424832f..2cc58f92 100644 --- a/calendar-client/src/widget/weekWidget/weekheadview.cpp +++ b/calendar-client/src/widget/weekWidget/weekheadview.cpp @@ -364,7 +364,7 @@ void CWeekHeadView::paintCell(QWidget *cell) void CWeekHeadView::wheelEvent(QWheelEvent *e) { //如果滚轮为左右方向则触发信号 - if (e->angleDelta().x() != 0 ) { + if (e->angleDelta().x() != 0) { emit signalAngleDelta(e->angleDelta().x()); } } diff --git a/calendar-service/src/dbmanager/daccountdatabase.cpp b/calendar-service/src/dbmanager/daccountdatabase.cpp index 62d8a0a9..097139cc 100644 --- a/calendar-service/src/dbmanager/daccountdatabase.cpp +++ b/calendar-service/src/dbmanager/daccountdatabase.cpp @@ -60,7 +60,6 @@ QString DAccountDataBase::createSchedule(const DSchedule::Ptr &schedule) } } else { - schedule->setUid(""); qCWarning(ServiceLogger) << "schedule is null"; } diff --git a/translations/dde-calendar_en_US.ts b/translations/dde-calendar_en_US.ts index 99dfb06f..204c8a79 100644 --- a/translations/dde-calendar_en_US.ts +++ b/translations/dde-calendar_en_US.ts @@ -27,12 +27,12 @@ AccountManager - + Local account Local account - + Event types Event types @@ -142,7 +142,7 @@ New event - + New Event New Event @@ -879,17 +879,17 @@ Privacy Policy - + Syncing... Syncing... - + Sync successful Sync successful - + Sync failed, please try later Sync failed, please try later @@ -991,12 +991,12 @@ JobTypeListView - + export - + import ICS file @@ -1243,7 +1243,7 @@ YearFrame - + Y Y