- creates a "Bitcoin (testnet).lnk" when on testnet or a "Bitcoin (regtest).lnk, when on regtest
- fixes #5778
[Qt] honor current network when creating autostart link #5793
pull Diapolo wants to merge 2 commits into bitcoin:master from Diapolo:testnet-startup changing 1 files +35 −11-
Diapolo commented at 8:42 PM on February 14, 2015: none
- Diapolo renamed this:
[Qt] honor testnet when creating autostart link on Windows
[Qt] honor testnet when creating autostart links
on Feb 15, 2015 -
Diapolo commented at 3:30 PM on February 15, 2015: none
Hopefully fixed the Travis build and also added the change for Linux (needs testing).
-
in src/qt/guiutil.cpp:None in a1dd65899b outdated
599 | @@ -597,20 +600,33 @@ bool SetStartOnSystemStartup(bool fAutoStart) 600 | TCHAR pszExePath[MAX_PATH]; 601 | GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); 602 | 603 | - TCHAR pszArgs[5] = TEXT("-min"); 604 | + // Start client minimized 605 | + QString strArgs = "-min"; 606 | + // Start testnet client, if we are currently running testnet 607 | + if (Params().NetworkIDString() == "test")
laanwj commented at 5:39 AM on February 17, 2015:You could generalize this by passing the current value of testnet, or even regtest to the link,
strprintf("-testnet=%d -regtest=%d", GetBoolArg("-testnet"), GetBoolArg("-regtest"))Not that I think there is much use in an autostarting regtest instance.
laanwj commented at 9:58 AM on February 19, 2015:If you do keep it like this based on special-casing the network name, make sure that you avoid doing anything if the net is not
mainortestlaanwj commented at 9:45 AM on February 18, 2015: memberFailing travis on windows
CXX qt/qt_libbitcoinqt_a-guiutil.o qt/guiutil.cpp: In function ‘bool GUIUtil::SetStartOnSystemStartup(bool)’: qt/guiutil.cpp:610:61: error: cannot convert ‘WCHAR* {aka wchar_t*}’ to ‘TCHAR* {aka char*}’ in initialization qt/guiutil.cpp:611:42: error: no matching function for call to ‘QString::toWCharArray(TCHAR*&)’ qt/guiutil.cpp:611:42: note: candidate is: /home/travis/build/bitcoin/bitcoin/depends/x86_64-w64-mingw32/include/QtCore/qstring.h:824:12: note: int QString::toWCharArray(wchar_t*) const /home/travis/build/bitcoin/bitcoin/depends/x86_64-w64-mingw32/include/QtCore/qstring.h:824:12: note: no known conversion for argument 1 from ‘TCHAR* {aka char*}’ to ‘wchar_t*’ make[2]: *** [qt/qt_libbitcoinqt_a-guiutil.o] Error 1 make[2]: Leaving directory `/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-w64-mingw32/src' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-w64-mingw32/src' make: *** [check-recursive] Error 1laanwj added the label GUI on Feb 18, 2015Diapolo commented at 12:23 PM on February 18, 2015: noneYeah I already saw this... will need to rework :). Edit: Seems like some UNICODE and wchar_t problems...
Diapolo commented at 1:58 PM on February 18, 2015: noneWho is able to test this :)?
in src/qt/guiutil.cpp:None in 55c1eb1591 outdated
607 | + if (Params().NetworkIDString() == "test") 608 | + strArgs += " -testnet"; 609 | + 610 | +#ifdef UNICODE 611 | + // Convert the QString to TCHAR* 612 | + TCHAR* args = new TCHAR[strArgs.length() + 1];
laanwj commented at 10:10 AM on February 19, 2015:We should use RAII here, could be done in various ways. Most obvious is boost::scoped_array, e.g.
scoped_array<TCHAR> args (new TCHAR[strArgs.length() + 1]);Another option would be going through std::wstring, e.g.
std::wstring wstrArgs = strArgs.toStdWString(); TCHAR *args = W2T(wstrArgs.c_str());In this case the manual appending of a NULL byte can be avoided, and the code can be shorter.
Diapolo renamed this:[Qt] honor testnet when creating autostart links
[Qt] honor current network when creating autostart link
on Feb 19, 20159673c35daf[Qt, Win] honor current network when creating autostart link
- creates a "Bitcoin (testnet).lnk" when on testnet or a "Bitcoin (regtest).lnk, when on regtest - fixes #5778
[Qt, Linux] honor current network when creating autostart link 6cb4a52535laanwj commented at 4:18 PM on February 26, 2015: memberutACK
tykling commented at 3:57 PM on March 3, 2015: noneI have no means of building this, sorry, but from reviewing the code it appears to do exactly what is should :) Is there somewhere I can download the executable travis built and try that?
jonasschnelli commented at 6:08 AM on March 5, 2015: contributorTested ACK. Tested
regtestandtestnet(parallel). Checkbox also reacts correct if testnet/regtest link is already there.Binaries to test: https://builds.jonasschnelli.ch/pulls/5793/

After restart:
laanwj merged this on Mar 9, 2015laanwj closed this on Mar 9, 2015laanwj referenced this in commit d26f0b263c on Mar 9, 2015Diapolo deleted the branch on Mar 9, 2015random-zebra referenced this in commit f15a1674ce on Feb 6, 2021MarcoFalke locked this on Sep 8, 2021ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-30 18:16 UTC
More mirrored repositories can be found on mirror.b10c.me