Skip to content

Commit

Permalink
Avoid harcoded link
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinBuira committed Nov 19, 2024
1 parent 684114c commit 53d3594
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/inputhelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ QString InputHelp::merginSubscriptionLink() const
}
}

QString InputHelp::merginPricingLink() const
{
return inputWeb + "/pricing/" + utmTagSubscription;
}

QString InputHelp::privacyPolicyLink() const
{
return inputWeb + "/privacy-policy" + utmTagOther;
Expand Down
2 changes: 2 additions & 0 deletions app/inputhelp.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class InputHelp: public QObject
Q_PROPERTY( QString merginWebLink READ merginWebLink NOTIFY merginLinkChanged )
Q_PROPERTY( QString merginDashboardLink READ merginDashboardLink NOTIFY merginLinkChanged )
Q_PROPERTY( QString merginSubscriptionLink READ merginSubscriptionLink NOTIFY merginLinkChanged )
Q_PROPERTY( QString merginPricingLink READ merginPricingLink NOTIFY merginLinkChanged )
Q_PROPERTY( QString merginSubscriptionDetailsLink READ merginSubscriptionDetailsLink NOTIFY linkChanged )
Q_PROPERTY( QString howToEnableDigitizingLink READ howToEnableDigitizingLink NOTIFY linkChanged )
Q_PROPERTY( QString howToEnableBrowsingDataLink READ howToEnableBrowsingDataLink NOTIFY linkChanged )
Expand Down Expand Up @@ -63,6 +64,7 @@ class InputHelp: public QObject
QString merginWebLink() const;
QString merginDashboardLink() const;
QString merginSubscriptionLink() const;
QString merginPricingLink() const;
QString privacyPolicyLink() const;
QString merginSubscriptionDetailsLink() const;
QString howToEnableDigitizingLink() const;
Expand Down
4 changes: 2 additions & 2 deletions app/ios/iosviewdelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* View controller for iOSImagePicker
*/
@interface IOSViewDelegate : NSObject<UIImagePickerControllerDelegate,
UINavigationControllerDelegate>
UINavigationControllerDelegate>
{
@public
@public

IOSImagePicker *handler;
BOOL processingPicture;
Expand Down
2 changes: 1 addition & 1 deletion app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ ApplicationWindow {
Qt.openUrlExternally(__inputHelp.merginSubscriptionLink)
}
else {
Qt.openUrlExternally("https://www.merginmaps.com/pricing")
Qt.openUrlExternally(__inputHelp.merginPricingLink)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions app/test/testlinks.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ class TestLinks: public QObject
_run( mHelp.merginSubscriptionLink() );
}

void testMerginPricingLink()
{
_run( mHelp.merginPricingLink() );
}

void testMerginSubscriptionDetailsLink()
{
_run( mHelp.merginSubscriptionDetailsLink() );
Expand Down

0 comments on commit 53d3594

Please sign in to comment.