Skip to content

Commit

Permalink
Modify generate update json
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Feb 2, 2024
1 parent c0c4182 commit 55799d5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ jobs:
working-directory: ${{github.workspace}}\build
run: |
.\install\bin\CalendarApp.exe ^
-f "${{github.workspace}}\build\update_windows.xml" ^
-f "${{github.workspace}}\build\update_windows.json" ^
--foc 1 ^
--pf ${{github.workspace}}\build\Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe ^
-m "${{env.Calendar_VERSION}}" ^
-u "https://github.com/KangLin/Calendar/releases/download/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe;https://sourceforge.net/projects/rabbitcalendar/files/${{env.Calendar_VERSION}}/Calendar_${{env.Calendar_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.exe"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ jobs:
MD5=`md5sum calendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb|awk '{print $1}'`
echo "MD5:${MD5}"
/opt/Calendar/bin/Calendar.sh \
-f "${{github.workspace}}/update_linux.xml" \
-f "${{github.workspace}}/update_ubuntu.json" \
--foc 1 \
--md5 ${MD5} \
-n "rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb"
-m "${{env.Calendar_VERSION}}" \
-u "https://github.com/KangLin/Calendar/releases/download/v${{env.Calendar_VERSION}}/rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb;https://sourceforge.net/projects/rabbitcalendar/files/v${{env.Calendar_VERSION}}/rabbitcalendar_${{env.Calendar_VERSION}}_ubuntu_amd64.deb"
Expand Down
2 changes: 1 addition & 1 deletion 3th_libs/LunarCalendar
7 changes: 5 additions & 2 deletions App/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ int main(int argc, char *argv[])
}
}
pUpdate->SetInstallAutoStartup();
if(!pUpdate->GenerateUpdateXml())
return 0;
if(a.arguments().length() > 1) {
pUpdate->GenerateUpdateJson();
pUpdate->GenerateUpdateXml();
return 0;
}
#endif

CMainWindow m;
Expand Down
7 changes: 4 additions & 3 deletions Src/FrmCalendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ CTasksHandler::~CTasksHandler()

uint CTasksHandler::onHandle(const QDate &date, QStringList &tasks)
{
return m_pFrmCalendar->onHandle(date, tasks);
if(m_pFrmCalendar)
return m_pFrmCalendar->onHandle(date, tasks);
}

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / macos / build_macos (Debug, 5.12.12, clang_64, x64-osx)

non-void function does not return a value in all control paths [-Wreturn-type]

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / macos / build_macos (Release, 5.12.12, clang_64, x64-osx)

non-void function does not return a value in all control paths [-Wreturn-type]

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / msvc / build_msvc (Debug, 5.15.2)

'CTasksHandler::onHandle': not all control paths return a value [D:\a\Calendar\Calendar\build\Src\Tasks.vcxproj]

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / msvc / build_msvc (Debug, 6.6.1)

'CTasksHandler::onHandle': not all control paths return a value [D:\a\Calendar\Calendar\build\Src\Tasks.vcxproj]

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / msvc / build_msvc (Release, 5.15.2)

'CTasksHandler::onHandle': not all control paths return a value [D:\a\Calendar\Calendar\build\Src\Tasks.vcxproj]

Check warning on line 44 in Src/FrmCalendar.cpp

View workflow job for this annotation

GitHub Actions / msvc / build_msvc (Release, 6.6.1)

'CTasksHandler::onHandle': not all control paths return a value [D:\a\Calendar\Calendar\build\Src\Tasks.vcxproj]

CFrmCalendar::CFrmCalendar(QWidget *parent) :
Expand Down Expand Up @@ -387,10 +388,10 @@ int CFrmCalendar::onHandle(/*in*/const QDate& date, /*out*/QStringList& t)
if(task)
{
const QMetaObject* pObj = task->metaObject();
if(QString("CTaskActivity") == pObj->className())
if(pObj && QString("CTaskActivity") == pObj->className())
{
CTaskActivity* pTask = static_cast<CTaskActivity*>(task.data());
if(pTask->CheckDate(date) == 0)
if(pTask && pTask->CheckDate(date) == 0)
{
nCount++;
t << pTask->GetTitle();
Expand Down

0 comments on commit 55799d5

Please sign in to comment.