Bug 496715 - compile error in kmessagewidgettest.cpp
Summary: compile error in kmessagewidgettest.cpp
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.8.0
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-26 18:27 UTC by Glenn Burkhardt
Modified: 2025-01-03 03:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Burkhardt 2024-11-26 18:27:19 UTC
SUMMARY
C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/kmessagewidgettest.cpp:110:1: error:control reaches end of non-void function [-Werror=return-type]
  110 | }
      | ^


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows:  11
gcc.exe (Rev1, Built by MSYS2 project) 14.2.0

ADDITIONAL INFORMATION
Just swap the last two lines to fix.  

Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/kmessagewidgettest.cpp
*** C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/kmessagewidgettest.cpp~      Sat Nov  2 11:49:43 2024
--- C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/kmessagewidgettest.cpp       Tue Nov 26 13:17:38 2024
***************
*** 105,112 ****
      Receiver *info = new Receiver(mw);
      QObject::connect(mw, &KMessageWidget::linkActivated, info, &Receiver::showWhatsThis);

-     return app.exec();
      delete mainWindow;
  }

  #include "kmessagewidgettest.moc"
--- 105,112 ----
      Receiver *info = new Receiver(mw);
      QObject::connect(mw, &KMessageWidget::linkActivated, info, &Receiver::showWhatsThis);

      delete mainWindow;
+     return app.exec();
  }

  #include "kmessagewidgettest.moc"
Comment 1 Glenn Burkhardt 2024-11-26 18:35:56 UTC
Well, probably remove the

     delete mainWindow;

line.
Comment 2 John Kizer 2024-12-01 18:26:45 UTC
Hi - am I reading correctly that you've identified a patch for the issue you're describing?

If so, that's fantastic! To make sure it gets applied and isn't missed, could you please submit this patch as a merge request using GitLab? (https://community.kde.org/Infrastructure/GitLab)

Thanks!
Comment 3 Glenn Burkhardt 2024-12-04 21:05:43 UTC
(In reply to Glenn Burkhardt from comment #0)
> SUMMARY
> C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/
> kmessagewidgettest.cpp:110:1: error:control reaches end of non-void function
> [-Werror=return-type]
>   110 | }
>       | ^
> 
> 
> STEPS TO REPRODUCE
> 1. 
> 2. 
> 3. 
> 
> OBSERVED RESULT
> 
> 
> EXPECTED RESULT
> 
> 
> SOFTWARE/OS VERSIONS
> Windows:  11
> gcc.exe (Rev1, Built by MSYS2 project) 14.2.0
> 
> ADDITIONAL INFORMATION
> Just swap the last two lines to fix.  
> 
> Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/
> kmessagewidgettest.cpp
> ***
> C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/
> kmessagewidgettest.cpp~      Sat Nov  2 11:49:43 2024
> ---
> C:/Users/glenn/msys2/kde-frameworks/kwidgetsaddons-6.8.0/tests/
> kmessagewidgettest.cpp       Tue Nov 26 13:17:38 2024
> ***************
> *** 105,112 ****
>       Receiver *info = new Receiver(mw);
>       QObject::connect(mw, &KMessageWidget::linkActivated, info,
> &Receiver::showWhatsThis);
> 
> -     return app.exec();
>       delete mainWindow;
>   }
> 
>   #include "kmessagewidgettest.moc"
> --- 105,112 ----
>       Receiver *info = new Receiver(mw);
>       QObject::connect(mw, &KMessageWidget::linkActivated, info,
> &Receiver::showWhatsThis);
> 
>       delete mainWindow;
> +     return app.exec();
>   }
> 
>   #include "kmessagewidgettest.moc"

Clearly this isn't right.  The main window shouldn't be deleted before the 'app.exec()' call.  Probably just remove the "delete mainWindow;" line.
Comment 4 Bug Janitor Service 2024-12-19 03:46:53 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2025-01-03 03:47:37 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.