Remove use of const char * in public API and OS specific where possible

* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
This commit is contained in:
baldurk
2020-12-04 20:21:33 +00:00
parent df6fec13f9
commit e5f4ca7bb8
109 changed files with 777 additions and 840 deletions
+1 -6
View File
@@ -150,12 +150,7 @@ void UpdateDialog::on_update_clicked()
if(!runningPrograms.isEmpty())
runningPrograms += lit("\n");
QString target =
conn->GetTarget() ? QString::fromUtf8(conn->GetTarget()) : lit("<unknown>");
if(conn->GetAPI())
runningPrograms += tr("%1 running %2").arg(target).arg(QString::fromUtf8(conn->GetAPI()));
else
runningPrograms += target;
runningPrograms += tr("%1 running %2").arg(conn->GetTarget()).arg(conn->GetAPI());
conn->Shutdown();
}